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/gen.wgsl.tmpl b/test/tint/builtins/gen/gen.wgsl.tmpl
index e0e8007..25e174e 100644
--- a/test/tint/builtins/gen/gen.wgsl.tmpl
+++ b/test/tint/builtins/gen/gen.wgsl.tmpl
@@ -13,20 +13,16 @@
 {{- range Sem.Builtins -}}
 {{-   range .Overloads  -}}
 {{-     range Permute . -}}
-{{- /*    TODO(crbug.com/tint/1502): Remove the bodge below and emit "enable f16;" after
-          getting ready for F16 end-to-end tests.                                        */ -}}
-{{-       if not (OverloadUsesF16 .Overload) -}}
-{{- /*      Generate a ./literal/<function>/<permuataion-hash>.wgsl file using
-            the Permutation macro defined below                             */ -}}
-{{-         $file := printf "./literal/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
-{{-         $content := Eval "Permutation" "Overload" . "Mode" "literal" -}}
-{{-         WriteFile $file $content -}}
-{{- /*      Generate a ./var/<function>/<permuataion-hash>.wgsl file using
-            the Permutation macro defined below                             */ -}}
-{{-         $file := printf "./var/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
-{{-         $content := Eval "Permutation" "Overload" . "Mode" "var" -}}
-{{-         WriteFile $file $content -}}
-{{-       end  }}
+{{- /*    Generate a ./literal/<function>/<permuataion-hash>.wgsl file using
+          the Permutation macro defined below                             */ -}}
+{{-       $file := printf "./literal/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
+{{-       $content := Eval "Permutation" "Overload" . "Mode" "literal" -}}
+{{-       WriteFile $file $content -}}
+{{- /*    Generate a ./var/<function>/<permuataion-hash>.wgsl file using
+          the Permutation macro defined below                             */ -}}
+{{-       $file := printf "./var/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
+{{-       $content := Eval "Permutation" "Overload" . "Mode" "var" -}}
+{{-       WriteFile $file $content -}}
 {{-     end  }}
 {{-   end  }}
 {{- end  }}
@@ -178,14 +174,20 @@
 {{-                        define "EnableDirectives"                         -}}
 {{- /* Emits the required enable directives for a given overload          */ -}}
 {{- /* ------------------------------------------------------------------ */ -}}
-{{-   $overload     := . -}}
-{{-   $builtin_name := $overload.Intrinsic.Name -}}
+{{-   $permutation  := . -}}
+{{-   $overload := $permutation.Overload -}}
+{{-   $builtin_name := $permutation.Intrinsic.Name -}}
 
 {{- /* Check and emit chromium_experimental_dp4a */ -}}
 {{-   if or (eq "dot4I8Packed" $builtin_name) (eq "dot4U8Packed" $builtin_name)}}
 enable chromium_experimental_dp4a;
 {{    end -}}
 
+{{- /* Check and emit f16 */ -}}
+{{-   if OverloadUsesF16 $overload}}
+enable f16;
+{{    end -}}
+
 {{- end -}}
 
 
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..060c13f
--- /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..ff11d38
--- /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..2e7d4bd
--- /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..daaa416
--- /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..ce722db
--- /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..d64d5a1
--- /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();
+}
diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl
new file mode 100644
index 0000000..c5557d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = abs(arg_0);
+}
+
+@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/var/abs/421ca3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cd5239b
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void abs_421ca3() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = abs(arg_0);
+}
+
+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/var/abs/421ca3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5e90e2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void abs_421ca3() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = abs(arg_0);
+}
+
+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@0x000002C922E88770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C922E88770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.glsl
new file mode 100644
index 0000000..8ddae5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_421ca3() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = abs(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = abs(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = abs(arg_0);
+}
+
+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/var/abs/421ca3.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.msl
new file mode 100644
index 0000000..e40c3ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_421ca3() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = fabs(arg_0);
+}
+
+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/var/abs/421ca3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.spvasm
new file mode 100644
index 0000000..1f1be0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %abs_421ca3 "abs_421ca3"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_421ca3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 FAbs %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %abs_421ca3
+               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 %abs_421ca3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %abs_421ca3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.wgsl
new file mode 100644
index 0000000..7d15e4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn abs_421ca3() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = abs(arg_0);
+}
+
+@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/var/abs/538d29.wgsl b/test/tint/builtins/gen/var/abs/538d29.wgsl
new file mode 100644
index 0000000..333532f
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = abs(arg_0);
+}
+
+@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/var/abs/538d29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..99a9860
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void abs_538d29() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = abs(arg_0);
+}
+
+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/var/abs/538d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1f4e9ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void abs_538d29() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = abs(arg_0);
+}
+
+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@0x000001B8FDD307F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8FDD307F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.glsl
new file mode 100644
index 0000000..10d37e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_538d29() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = abs(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = abs(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = abs(arg_0);
+}
+
+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/var/abs/538d29.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.msl
new file mode 100644
index 0000000..3c8d74a
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_538d29() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = fabs(arg_0);
+}
+
+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/var/abs/538d29.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.spvasm
new file mode 100644
index 0000000..777bcc2
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %abs_538d29 "abs_538d29"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_538d29 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 FAbs %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %abs_538d29
+               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 %abs_538d29
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %abs_538d29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.wgsl
new file mode 100644
index 0000000..e7749f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn abs_538d29() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = abs(arg_0);
+}
+
+@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/var/abs/5ae4fe.wgsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl
new file mode 100644
index 0000000..19384bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = abs(arg_0);
+}
+
+@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/var/abs/5ae4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eb119af
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void abs_5ae4fe() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = abs(arg_0);
+}
+
+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/var/abs/5ae4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dc15e74
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void abs_5ae4fe() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = abs(arg_0);
+}
+
+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@0x00000183992C05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000183992C05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.glsl
new file mode 100644
index 0000000..38a613d
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_5ae4fe() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = abs(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = abs(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = abs(arg_0);
+}
+
+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/var/abs/5ae4fe.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.msl
new file mode 100644
index 0000000..2a223eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_5ae4fe() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = fabs(arg_0);
+}
+
+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/var/abs/5ae4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..451a932
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %abs_5ae4fe "abs_5ae4fe"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_5ae4fe = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 FAbs %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %abs_5ae4fe
+               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 %abs_5ae4fe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %abs_5ae4fe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..fe5cd69
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn abs_5ae4fe() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = abs(arg_0);
+}
+
+@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/var/abs/fd247f.wgsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl
new file mode 100644
index 0000000..a347b41
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = abs(arg_0);
+}
+
+@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/var/abs/fd247f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..94ac0c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void abs_fd247f() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = abs(arg_0);
+}
+
+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/var/abs/fd247f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..891b948
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void abs_fd247f() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = abs(arg_0);
+}
+
+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@0x000002C33CE4C600(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C33CE4C600(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.glsl
new file mode 100644
index 0000000..704f3ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_fd247f() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = abs(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = abs(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = abs(arg_0);
+}
+
+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/var/abs/fd247f.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.msl
new file mode 100644
index 0000000..0090547
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_fd247f() {
+  half arg_0 = 0.0h;
+  half res = fabs(arg_0);
+}
+
+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/var/abs/fd247f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.spvasm
new file mode 100644
index 0000000..7594c69
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_fd247f = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 FAbs %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %abs_fd247f
+               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 %abs_fd247f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %abs_fd247f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.wgsl
new file mode 100644
index 0000000..99d265c
--- /dev/null
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn abs_fd247f() {
+  var arg_0 = f16();
+  var res : f16 = abs(arg_0);
+}
+
+@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/var/acos/004aff.wgsl b/test/tint/builtins/gen/var/acos/004aff.wgsl
new file mode 100644
index 0000000..a414dbc
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = acos(arg_0);
+}
+
+@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/var/acos/004aff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..46a0caf
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void acos_004aff() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = acos(arg_0);
+}
+
+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/var/acos/004aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6332759
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void acos_004aff() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = acos(arg_0);
+}
+
+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@0x0000014A098A05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000014A098A05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.glsl
new file mode 100644
index 0000000..1b33ea1
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_004aff() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = acos(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = acos(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = acos(arg_0);
+}
+
+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/var/acos/004aff.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.msl
new file mode 100644
index 0000000..c5a6e76
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_004aff() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = acos(arg_0);
+}
+
+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/var/acos/004aff.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.spvasm
new file mode 100644
index 0000000..b654c2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %acos_004aff "acos_004aff"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_004aff = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Acos %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %acos_004aff
+               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 %acos_004aff
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %acos_004aff
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.wgsl
new file mode 100644
index 0000000..9f2035b
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acos_004aff() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = acos(arg_0);
+}
+
+@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/var/acos/203628.wgsl b/test/tint/builtins/gen/var/acos/203628.wgsl
new file mode 100644
index 0000000..6ec10ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = acos(arg_0);
+}
+
+@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/var/acos/203628.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b2c8911
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void acos_203628() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = acos(arg_0);
+}
+
+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/var/acos/203628.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..388e412
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void acos_203628() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = acos(arg_0);
+}
+
+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@0x00000227066CF430(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000227066CF430(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.glsl
new file mode 100644
index 0000000..fa94d0f
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_203628() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = acos(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = acos(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = acos(arg_0);
+}
+
+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/var/acos/203628.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.msl
new file mode 100644
index 0000000..9f35174
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_203628() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = acos(arg_0);
+}
+
+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/var/acos/203628.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.spvasm
new file mode 100644
index 0000000..3069e9a
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %acos_203628 "acos_203628"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_203628 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Acos %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %acos_203628
+               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 %acos_203628
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %acos_203628
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.wgsl
new file mode 100644
index 0000000..78fc613
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acos_203628() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = acos(arg_0);
+}
+
+@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/var/acos/303e3d.wgsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl
new file mode 100644
index 0000000..39290af
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = acos(arg_0);
+}
+
+@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/var/acos/303e3d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dd39161
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void acos_303e3d() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = acos(arg_0);
+}
+
+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/var/acos/303e3d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..48013a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void acos_303e3d() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = acos(arg_0);
+}
+
+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@0x000001C6C153CEA0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C6C153CEA0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.glsl
new file mode 100644
index 0000000..5a6a3e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_303e3d() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = acos(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = acos(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = acos(arg_0);
+}
+
+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/var/acos/303e3d.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.msl
new file mode 100644
index 0000000..05c4e64
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_303e3d() {
+  half arg_0 = 0.0h;
+  half res = acos(arg_0);
+}
+
+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/var/acos/303e3d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.spvasm
new file mode 100644
index 0000000..b915e0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_303e3d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Acos %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %acos_303e3d
+               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 %acos_303e3d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %acos_303e3d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.wgsl
new file mode 100644
index 0000000..e91cf5b
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acos_303e3d() {
+  var arg_0 = f16();
+  var res : f16 = acos(arg_0);
+}
+
+@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/var/acos/f47057.wgsl b/test/tint/builtins/gen/var/acos/f47057.wgsl
new file mode 100644
index 0000000..b1b2fe7
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = acos(arg_0);
+}
+
+@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/var/acos/f47057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8f0fa43
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void acos_f47057() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = acos(arg_0);
+}
+
+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/var/acos/f47057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b3376d
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void acos_f47057() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = acos(arg_0);
+}
+
+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@0x00000287C9AECA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000287C9AECA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.glsl
new file mode 100644
index 0000000..67209db
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_f47057() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = acos(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = acos(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = acos(arg_0);
+}
+
+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/var/acos/f47057.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.msl
new file mode 100644
index 0000000..376ae7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_f47057() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = acos(arg_0);
+}
+
+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/var/acos/f47057.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.spvasm
new file mode 100644
index 0000000..dcfdc44
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %acos_f47057 "acos_f47057"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_f47057 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Acos %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %acos_f47057
+               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 %acos_f47057
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %acos_f47057
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.wgsl
new file mode 100644
index 0000000..5b55578
--- /dev/null
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acos_f47057() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = acos(arg_0);
+}
+
+@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/var/acosh/5f49d8.wgsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl
new file mode 100644
index 0000000..d421a81
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = acosh(arg_0);
+}
+
+@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/var/acosh/5f49d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d2768e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_acosh(arg_0);
+}
+
+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/var/acosh/5f49d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bfa965b
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_acosh(arg_0);
+}
+
+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@0x000002311F9F6BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.glsl
new file mode 100644
index 0000000..033e902
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_acosh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_acosh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_acosh(arg_0);
+}
+
+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/var/acosh/5f49d8.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.msl
new file mode 100644
index 0000000..b6ed0f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#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 arg_0 = half2(0.0h);
+  half2 res = tint_acosh(arg_0);
+}
+
+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/var/acosh/5f49d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..bb409ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %33 = 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
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %21
+        %res = OpVariable %_ptr_Function_v2half Function %21
+               OpStore %arg_0 %21
+         %31 = OpLoad %v2half %arg_0
+         %30 = OpFunctionCall %v2half %tint_acosh %31
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %acosh_5f49d8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %acosh_5f49d8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %acosh_5f49d8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..027ad72
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acosh_5f49d8() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = acosh(arg_0);
+}
+
+@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/var/acosh/a37dfe.wgsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl
new file mode 100644
index 0000000..805b9fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = acosh(arg_0);
+}
+
+@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/var/acosh/a37dfe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..632b730
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+float16_t tint_acosh(float16_t x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_a37dfe() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_acosh(arg_0);
+}
+
+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/var/acosh/a37dfe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ca1ca13
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+float16_t tint_acosh(float16_t x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_a37dfe() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_acosh(arg_0);
+}
+
+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@0x000001D63F571640(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.glsl
new file mode 100644
index 0000000..be2d5fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = 0.0hf;
+  float16_t res = tint_acosh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_acosh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_acosh(arg_0);
+}
+
+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/var/acosh/a37dfe.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.msl
new file mode 100644
index 0000000..77aed14
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half tint_acosh(half x) {
+  return select(acosh(x), 0.0h, (x < 1.0h));
+}
+
+void acosh_a37dfe() {
+  half arg_0 = 0.0h;
+  half res = tint_acosh(arg_0);
+}
+
+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/var/acosh/a37dfe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.spvasm
new file mode 100644
index 0000000..1eede38
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %30 = 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
+      %arg_0 = OpVariable %_ptr_Function_half Function %18
+        %res = OpVariable %_ptr_Function_half Function %18
+               OpStore %arg_0 %18
+         %28 = OpLoad %half %arg_0
+         %27 = OpFunctionCall %half %tint_acosh %28
+               OpStore %res %27
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %acosh_a37dfe
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %21
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %acosh_a37dfe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %acosh_a37dfe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.wgsl
new file mode 100644
index 0000000..c5a8436
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acosh_a37dfe() {
+  var arg_0 = f16();
+  var res : f16 = acosh(arg_0);
+}
+
+@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/var/acosh/de60d8.wgsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl
new file mode 100644
index 0000000..06b3c4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = acosh(arg_0);
+}
+
+@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/var/acosh/de60d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..beda5f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_acosh(arg_0);
+}
+
+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/var/acosh/de60d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f2776f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_acosh(arg_0);
+}
+
+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@0x0000021E640184D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.glsl
new file mode 100644
index 0000000..b63ecb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_acosh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_acosh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_acosh(arg_0);
+}
+
+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/var/acosh/de60d8.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.msl
new file mode 100644
index 0000000..0514328
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#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 arg_0 = half4(0.0h);
+  half4 res = tint_acosh(arg_0);
+}
+
+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/var/acosh/de60d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..10eef9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %33 = 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
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %21
+        %res = OpVariable %_ptr_Function_v4half Function %21
+               OpStore %arg_0 %21
+         %31 = OpLoad %v4half %arg_0
+         %30 = OpFunctionCall %v4half %tint_acosh %31
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %acosh_de60d8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %acosh_de60d8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %acosh_de60d8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..d8a3b14
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acosh_de60d8() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = acosh(arg_0);
+}
+
+@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/var/acosh/f56574.wgsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl
new file mode 100644
index 0000000..b6e484a
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = acosh(arg_0);
+}
+
+@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/var/acosh/f56574.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b89a6f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_acosh(arg_0);
+}
+
+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/var/acosh/f56574.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a531094
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_acosh(arg_0);
+}
+
+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@0x0000027554446BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.glsl
new file mode 100644
index 0000000..a5e2a4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_acosh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_acosh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_acosh(arg_0);
+}
+
+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/var/acosh/f56574.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.msl
new file mode 100644
index 0000000..7499b88
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#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 arg_0 = half3(0.0h);
+  half3 res = tint_acosh(arg_0);
+}
+
+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/var/acosh/f56574.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.spvasm
new file mode 100644
index 0000000..d818740
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %33 = 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
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %21
+        %res = OpVariable %_ptr_Function_v3half Function %21
+               OpStore %arg_0 %21
+         %31 = OpLoad %v3half %arg_0
+         %30 = OpFunctionCall %v3half %tint_acosh %31
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %acosh_f56574
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %acosh_f56574
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %acosh_f56574
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.wgsl
new file mode 100644
index 0000000..8cbc4f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn acosh_f56574() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = acosh(arg_0);
+}
+
+@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/var/arrayLength/8421b9.wgsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl
new file mode 100644
index 0000000..0a04948
--- /dev/null
+++ b/test/tint/builtins/gen/var/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/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..58ecc49
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..58ecc49
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/8421b9.wgsl.expected.glsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.glsl
new file mode 100644
index 0000000..58ecc49
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/8421b9.wgsl.expected.msl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
new file mode 100644
index 0000000..58ecc49
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/8421b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..58ecc49
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/8421b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..58ecc49
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/cbd6b5.wgsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl
new file mode 100644
index 0000000..e457a8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/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/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..07baca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07baca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/cbd6b5.wgsl.expected.glsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.glsl
new file mode 100644
index 0000000..07baca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/cbd6b5.wgsl.expected.msl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
new file mode 100644
index 0000000..07baca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/cbd6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
new file mode 100644
index 0000000..07baca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/arrayLength/cbd6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
new file mode 100644
index 0000000..07baca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/var/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/var/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/var/asin/11dfda.wgsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl
new file mode 100644
index 0000000..c9b2506
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = asin(arg_0);
+}
+
+@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/var/asin/11dfda.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..10ac617
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void asin_11dfda() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = asin(arg_0);
+}
+
+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/var/asin/11dfda.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..806254c
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void asin_11dfda() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = asin(arg_0);
+}
+
+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@0x000001D54DD58900(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D54DD58900(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.glsl
new file mode 100644
index 0000000..948c08d
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_11dfda() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = asin(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = asin(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = asin(arg_0);
+}
+
+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/var/asin/11dfda.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.msl
new file mode 100644
index 0000000..f59c879
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_11dfda() {
+  half arg_0 = 0.0h;
+  half res = asin(arg_0);
+}
+
+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/var/asin/11dfda.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.spvasm
new file mode 100644
index 0000000..2e6097a
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_11dfda = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Asin %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %asin_11dfda
+               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 %asin_11dfda
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %asin_11dfda
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.wgsl
new file mode 100644
index 0000000..abe2463
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asin_11dfda() {
+  var arg_0 = f16();
+  var res : f16 = asin(arg_0);
+}
+
+@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/var/asin/2d8e29.wgsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl
new file mode 100644
index 0000000..fdf613e
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = asin(arg_0);
+}
+
+@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/var/asin/2d8e29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4c22612
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void asin_2d8e29() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = asin(arg_0);
+}
+
+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/var/asin/2d8e29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c95a38d
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void asin_2d8e29() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = asin(arg_0);
+}
+
+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@0x00000243E5218C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000243E5218C90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.glsl
new file mode 100644
index 0000000..e5c01ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_2d8e29() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = asin(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = asin(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = asin(arg_0);
+}
+
+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/var/asin/2d8e29.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.msl
new file mode 100644
index 0000000..efafdf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_2d8e29() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = asin(arg_0);
+}
+
+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/var/asin/2d8e29.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.spvasm
new file mode 100644
index 0000000..292429e
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %asin_2d8e29 "asin_2d8e29"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_2d8e29 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Asin %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %asin_2d8e29
+               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 %asin_2d8e29
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %asin_2d8e29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.wgsl
new file mode 100644
index 0000000..c93cae1
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asin_2d8e29() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = asin(arg_0);
+}
+
+@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/var/asin/3cfbd4.wgsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl
new file mode 100644
index 0000000..022f69a
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = asin(arg_0);
+}
+
+@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/var/asin/3cfbd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a356558
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void asin_3cfbd4() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = asin(arg_0);
+}
+
+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/var/asin/3cfbd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..16015bb
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void asin_3cfbd4() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = asin(arg_0);
+}
+
+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@0x0000019720581EE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019720581EE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.glsl
new file mode 100644
index 0000000..35f9bd9
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_3cfbd4() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = asin(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = asin(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = asin(arg_0);
+}
+
+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/var/asin/3cfbd4.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.msl
new file mode 100644
index 0000000..394f485
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_3cfbd4() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = asin(arg_0);
+}
+
+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/var/asin/3cfbd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.spvasm
new file mode 100644
index 0000000..35e557c
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %asin_3cfbd4 "asin_3cfbd4"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_3cfbd4 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Asin %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %asin_3cfbd4
+               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 %asin_3cfbd4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %asin_3cfbd4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.wgsl
new file mode 100644
index 0000000..91e42c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asin_3cfbd4() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = asin(arg_0);
+}
+
+@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/var/asin/b4aced.wgsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl
new file mode 100644
index 0000000..f69143a
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = asin(arg_0);
+}
+
+@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/var/asin/b4aced.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4d0043a
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void asin_b4aced() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = asin(arg_0);
+}
+
+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/var/asin/b4aced.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..729a746
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void asin_b4aced() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = asin(arg_0);
+}
+
+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@0x00000274BBD1CA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000274BBD1CA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.glsl
new file mode 100644
index 0000000..65fdee3
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_b4aced() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = asin(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = asin(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = asin(arg_0);
+}
+
+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/var/asin/b4aced.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.msl
new file mode 100644
index 0000000..c2bab89
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_b4aced() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = asin(arg_0);
+}
+
+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/var/asin/b4aced.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.spvasm
new file mode 100644
index 0000000..b11a782
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %asin_b4aced "asin_b4aced"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_b4aced = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Asin %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %asin_b4aced
+               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 %asin_b4aced
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %asin_b4aced
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.wgsl
new file mode 100644
index 0000000..056003b
--- /dev/null
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asin_b4aced() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = asin(arg_0);
+}
+
+@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/var/asinh/468a48.wgsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl
new file mode 100644
index 0000000..6a2992f
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = asinh(arg_0);
+}
+
+@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/var/asinh/468a48.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bdeb8b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+float16_t tint_sinh(float16_t x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_468a48() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_sinh(arg_0);
+}
+
+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/var/asinh/468a48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dcbf450
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+float16_t tint_sinh(float16_t x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_468a48() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_sinh(arg_0);
+}
+
+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@0x000002776ED11E20(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.glsl
new file mode 100644
index 0000000..70eee10
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_468a48() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = asinh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = asinh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = asinh(arg_0);
+}
+
+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/var/asinh/468a48.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.msl
new file mode 100644
index 0000000..22a59d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_468a48() {
+  half arg_0 = 0.0h;
+  half res = asinh(arg_0);
+}
+
+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/var/asinh/468a48.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.spvasm
new file mode 100644
index 0000000..93c8f5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_468a48 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Asinh %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %asinh_468a48
+               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 %asinh_468a48
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %asinh_468a48
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.wgsl
new file mode 100644
index 0000000..b8b458c
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asinh_468a48() {
+  var arg_0 = f16();
+  var res : f16 = asinh(arg_0);
+}
+
+@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/var/asinh/95ab2b.wgsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl
new file mode 100644
index 0000000..1c73478
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = asinh(arg_0);
+}
+
+@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/var/asinh/95ab2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bbbe9f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_sinh(arg_0);
+}
+
+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/var/asinh/95ab2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..60b07b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_sinh(arg_0);
+}
+
+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@0x000002E3B2D56BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.glsl
new file mode 100644
index 0000000..ec6f916
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_95ab2b() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = asinh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = asinh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = asinh(arg_0);
+}
+
+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/var/asinh/95ab2b.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.msl
new file mode 100644
index 0000000..ab99246
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_95ab2b() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = asinh(arg_0);
+}
+
+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/var/asinh/95ab2b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.spvasm
new file mode 100644
index 0000000..cbaf25c
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %asinh_95ab2b "asinh_95ab2b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_95ab2b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Asinh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %asinh_95ab2b
+               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 %asinh_95ab2b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %asinh_95ab2b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.wgsl
new file mode 100644
index 0000000..882f15d
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asinh_95ab2b() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = asinh(arg_0);
+}
+
+@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/var/asinh/ad8f8b.wgsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl
new file mode 100644
index 0000000..6cc709d
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = asinh(arg_0);
+}
+
+@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/var/asinh/ad8f8b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68d01e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_sinh(arg_0);
+}
+
+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/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2bec5b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_sinh(arg_0);
+}
+
+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@0x000001C8AF6F1580(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.glsl
new file mode 100644
index 0000000..2f66aaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_ad8f8b() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = asinh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = asinh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = asinh(arg_0);
+}
+
+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/var/asinh/ad8f8b.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.msl
new file mode 100644
index 0000000..4a6745f
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_ad8f8b() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = asinh(arg_0);
+}
+
+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/var/asinh/ad8f8b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.spvasm
new file mode 100644
index 0000000..b41573f
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %asinh_ad8f8b "asinh_ad8f8b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_ad8f8b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Asinh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %asinh_ad8f8b
+               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 %asinh_ad8f8b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %asinh_ad8f8b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.wgsl
new file mode 100644
index 0000000..2a96fe6
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asinh_ad8f8b() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = asinh(arg_0);
+}
+
+@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/var/asinh/fb5e8c.wgsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl
new file mode 100644
index 0000000..648ab73
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = asinh(arg_0);
+}
+
+@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/var/asinh/fb5e8c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2e127aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_sinh(arg_0);
+}
+
+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/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..75a4736
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_sinh(arg_0);
+}
+
+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@0x000001B966509E00(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.glsl
new file mode 100644
index 0000000..bb5859f
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_fb5e8c() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = asinh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = asinh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = asinh(arg_0);
+}
+
+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/var/asinh/fb5e8c.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.msl
new file mode 100644
index 0000000..344f7c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_fb5e8c() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = asinh(arg_0);
+}
+
+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/var/asinh/fb5e8c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.spvasm
new file mode 100644
index 0000000..63c34df
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %asinh_fb5e8c "asinh_fb5e8c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_fb5e8c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Asinh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %asinh_fb5e8c
+               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 %asinh_fb5e8c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %asinh_fb5e8c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.wgsl
new file mode 100644
index 0000000..c228108
--- /dev/null
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn asinh_fb5e8c() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = asinh(arg_0);
+}
+
+@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/var/atan/19faea.wgsl b/test/tint/builtins/gen/var/atan/19faea.wgsl
new file mode 100644
index 0000000..14c20e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = atan(arg_0);
+}
+
+@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/var/atan/19faea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..557db58
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void atan_19faea() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = atan(arg_0);
+}
+
+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/var/atan/19faea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04ac231
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void atan_19faea() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = atan(arg_0);
+}
+
+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@0x000001F5B44507F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F5B44507F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.glsl
new file mode 100644
index 0000000..46811fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_19faea() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = atan(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = atan(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = atan(arg_0);
+}
+
+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/var/atan/19faea.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.msl
new file mode 100644
index 0000000..f8d735b
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_19faea() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = atan(arg_0);
+}
+
+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/var/atan/19faea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.spvasm
new file mode 100644
index 0000000..2daa3f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %atan_19faea "atan_19faea"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_19faea = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Atan %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %atan_19faea
+               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 %atan_19faea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %atan_19faea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.wgsl
new file mode 100644
index 0000000..d93bec7
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atan_19faea() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = atan(arg_0);
+}
+
+@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/var/atan/1e1764.wgsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl
new file mode 100644
index 0000000..2f5d3b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = atan(arg_0);
+}
+
+@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/var/atan/1e1764.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6cb0a49
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void atan_1e1764() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = atan(arg_0);
+}
+
+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/var/atan/1e1764.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1775ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void atan_1e1764() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = atan(arg_0);
+}
+
+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@0x0000015CC8119100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015CC8119100(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.glsl
new file mode 100644
index 0000000..8c16874
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_1e1764() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = atan(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = atan(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = atan(arg_0);
+}
+
+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/var/atan/1e1764.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.msl
new file mode 100644
index 0000000..f7651c4
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_1e1764() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = atan(arg_0);
+}
+
+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/var/atan/1e1764.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.spvasm
new file mode 100644
index 0000000..0a1b7de
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %atan_1e1764 "atan_1e1764"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_1e1764 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Atan %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %atan_1e1764
+               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 %atan_1e1764
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %atan_1e1764
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.wgsl
new file mode 100644
index 0000000..86ba267
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atan_1e1764() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = atan(arg_0);
+}
+
+@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/var/atan/a5f421.wgsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl
new file mode 100644
index 0000000..c76fe4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = atan(arg_0);
+}
+
+@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/var/atan/a5f421.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aca9149
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void atan_a5f421() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = atan(arg_0);
+}
+
+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/var/atan/a5f421.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7eeb502
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void atan_a5f421() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = atan(arg_0);
+}
+
+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@0x000001E218212B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E218212B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.glsl
new file mode 100644
index 0000000..e4a545a
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_a5f421() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = atan(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = atan(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = atan(arg_0);
+}
+
+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/var/atan/a5f421.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.msl
new file mode 100644
index 0000000..800084d
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_a5f421() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = atan(arg_0);
+}
+
+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/var/atan/a5f421.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.spvasm
new file mode 100644
index 0000000..c41d678
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %atan_a5f421 "atan_a5f421"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_a5f421 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Atan %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %atan_a5f421
+               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 %atan_a5f421
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %atan_a5f421
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.wgsl
new file mode 100644
index 0000000..48d261a
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atan_a5f421() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = atan(arg_0);
+}
+
+@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/var/atan/a7ba61.wgsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl
new file mode 100644
index 0000000..a19eafc
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = atan(arg_0);
+}
+
+@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/var/atan/a7ba61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2697f3e
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void atan_a7ba61() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = atan(arg_0);
+}
+
+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/var/atan/a7ba61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1fae88d
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void atan_a7ba61() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = atan(arg_0);
+}
+
+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@0x00000193197C2E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000193197C2E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.glsl
new file mode 100644
index 0000000..4f7d41f
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_a7ba61() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = atan(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = atan(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = atan(arg_0);
+}
+
+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/var/atan/a7ba61.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.msl
new file mode 100644
index 0000000..33674c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_a7ba61() {
+  half arg_0 = 0.0h;
+  half res = atan(arg_0);
+}
+
+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/var/atan/a7ba61.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.spvasm
new file mode 100644
index 0000000..2442909
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_a7ba61 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Atan %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %atan_a7ba61
+               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 %atan_a7ba61
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %atan_a7ba61
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.wgsl
new file mode 100644
index 0000000..2237e13
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atan_a7ba61() {
+  var arg_0 = f16();
+  var res : f16 = atan(arg_0);
+}
+
+@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/var/atan2/21dfea.wgsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl
new file mode 100644
index 0000000..f45981b
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: vec3<f16> = atan2(arg_0, arg_1);
+}
+
+@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/var/atan2/21dfea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..811f791
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void atan2_21dfea() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/21dfea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7952947
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void atan2_21dfea() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = atan2(arg_0, arg_1);
+}
+
+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@0x00000155102818A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.glsl
new file mode 100644
index 0000000..e10e1d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_21dfea() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = atan(arg_0, arg_1);
+}
+
+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/var/atan2/21dfea.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.msl
new file mode 100644
index 0000000..2ed4954
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_21dfea() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/21dfea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.spvasm
new file mode 100644
index 0000000..22b64b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %atan2_21dfea "atan2_21dfea"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_21dfea = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %v3half %20 Atan2 %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %atan2_21dfea
+               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 %atan2_21dfea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %atan2_21dfea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.wgsl
new file mode 100644
index 0000000..e4c6b6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn atan2_21dfea() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : vec3<f16> = atan2(arg_0, arg_1);
+}
+
+@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/var/atan2/93febc.wgsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl
new file mode 100644
index 0000000..a09bf18
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: vec2<f16> = atan2(arg_0, arg_1);
+}
+
+@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/var/atan2/93febc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..780ec69
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void atan2_93febc() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/93febc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cdf1948
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void atan2_93febc() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = atan2(arg_0, arg_1);
+}
+
+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@0x000001B1F88A7150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.glsl
new file mode 100644
index 0000000..2184e82e
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_93febc() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = atan(arg_0, arg_1);
+}
+
+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/var/atan2/93febc.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.msl
new file mode 100644
index 0000000..27e327d
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_93febc() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/93febc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.spvasm
new file mode 100644
index 0000000..bdcbc06
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %atan2_93febc "atan2_93febc"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_93febc = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v2half %arg_0
+         %22 = OpLoad %v2half %arg_1
+         %19 = OpExtInst %v2half %20 Atan2 %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %atan2_93febc
+               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 %atan2_93febc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %atan2_93febc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.wgsl
new file mode 100644
index 0000000..487d271
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn atan2_93febc() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : vec2<f16> = atan2(arg_0, arg_1);
+}
+
+@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/var/atan2/ca698e.wgsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl
new file mode 100644
index 0000000..e1c18bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var res: f16 = atan2(arg_0, arg_1);
+}
+
+@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/var/atan2/ca698e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0d5b1d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void atan2_ca698e() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/ca698e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..044e1b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void atan2_ca698e() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = atan2(arg_0, arg_1);
+}
+
+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@0x00000284FEEEF860(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000284FEEEF860(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.glsl
new file mode 100644
index 0000000..3db5c43
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_ca698e() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = atan(arg_0, arg_1);
+}
+
+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/var/atan2/ca698e.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.msl
new file mode 100644
index 0000000..575cd00
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_ca698e() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/ca698e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.spvasm
new file mode 100644
index 0000000..01adb51
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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 %atan2_ca698e "atan2_ca698e"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_ca698e = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+         %20 = OpLoad %half %arg_0
+         %21 = OpLoad %half %arg_1
+         %18 = OpExtInst %half %19 Atan2 %20 %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %atan2_ca698e
+               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 %atan2_ca698e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %atan2_ca698e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.wgsl
new file mode 100644
index 0000000..1097b26
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn atan2_ca698e() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var res : f16 = atan2(arg_0, arg_1);
+}
+
+@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/var/atan2/d983ab.wgsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl
new file mode 100644
index 0000000..2d87cea
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: vec4<f16> = atan2(arg_0, arg_1);
+}
+
+@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/var/atan2/d983ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1e09843
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void atan2_d983ab() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/d983ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..926647d
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void atan2_d983ab() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = atan2(arg_0, arg_1);
+}
+
+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@0x0000023A1AB1D2D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.glsl
new file mode 100644
index 0000000..294b537
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_d983ab() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = atan(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = atan(arg_0, arg_1);
+}
+
+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/var/atan2/d983ab.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.msl
new file mode 100644
index 0000000..1f3cdbc
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_d983ab() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 res = atan2(arg_0, arg_1);
+}
+
+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/var/atan2/d983ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..a8b43d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %atan2_d983ab "atan2_d983ab"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_d983ab = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v4half %arg_0
+         %22 = OpLoad %v4half %arg_1
+         %19 = OpExtInst %v4half %20 Atan2 %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %atan2_d983ab
+               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 %atan2_d983ab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %atan2_d983ab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..8d7f937
--- /dev/null
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn atan2_d983ab() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : vec4<f16> = atan2(arg_0, arg_1);
+}
+
+@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/var/atanh/5bf88d.wgsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl
new file mode 100644
index 0000000..9ad6f3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = atanh(arg_0);
+}
+
+@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/var/atanh/5bf88d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..50adf29
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_atanh(arg_0);
+}
+
+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/var/atanh/5bf88d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c08dcf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_atanh(arg_0);
+}
+
+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@0x00000223A4C149E0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.glsl
new file mode 100644
index 0000000..d8e42b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_atanh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_atanh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_atanh(arg_0);
+}
+
+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/var/atanh/5bf88d.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.msl
new file mode 100644
index 0000000..633f841
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#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 arg_0 = half2(0.0h);
+  half2 res = tint_atanh(arg_0);
+}
+
+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/var/atanh/5bf88d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.spvasm
new file mode 100644
index 0000000..55870bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %33 = 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
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %21
+        %res = OpVariable %_ptr_Function_v2half Function %21
+               OpStore %arg_0 %21
+         %31 = OpLoad %v2half %arg_0
+         %30 = OpFunctionCall %v2half %tint_atanh %31
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %atanh_5bf88d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %atanh_5bf88d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %atanh_5bf88d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.wgsl
new file mode 100644
index 0000000..3d38ee5
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atanh_5bf88d() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = atanh(arg_0);
+}
+
+@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/var/atanh/d2d8cd.wgsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl
new file mode 100644
index 0000000..bbe88cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = atanh(arg_0);
+}
+
+@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/var/atanh/d2d8cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bf8166a
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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 arg_0 = float16_t(0.0h);
+  float16_t res = tint_atanh(arg_0);
+}
+
+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/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b725226
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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 arg_0 = float16_t(0.0h);
+  float16_t res = tint_atanh(arg_0);
+}
+
+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@0x00000275850EA270(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.glsl
new file mode 100644
index 0000000..d829f33
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = 0.0hf;
+  float16_t res = tint_atanh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_atanh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_atanh(arg_0);
+}
+
+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/var/atanh/d2d8cd.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.msl
new file mode 100644
index 0000000..d76fbdd
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half tint_atanh(half x) {
+  return select(atanh(x), 0.0h, (x >= 1.0h));
+}
+
+void atanh_d2d8cd() {
+  half arg_0 = 0.0h;
+  half res = tint_atanh(arg_0);
+}
+
+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/var/atanh/d2d8cd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.spvasm
new file mode 100644
index 0000000..343b75f
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %30 = 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
+      %arg_0 = OpVariable %_ptr_Function_half Function %18
+        %res = OpVariable %_ptr_Function_half Function %18
+               OpStore %arg_0 %18
+         %28 = OpLoad %half %arg_0
+         %27 = OpFunctionCall %half %tint_atanh %28
+               OpStore %res %27
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %atanh_d2d8cd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %21
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %atanh_d2d8cd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %atanh_d2d8cd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.wgsl
new file mode 100644
index 0000000..f9720ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atanh_d2d8cd() {
+  var arg_0 = f16();
+  var res : f16 = atanh(arg_0);
+}
+
+@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/var/atanh/e3b450.wgsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl
new file mode 100644
index 0000000..f1fa1f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = atanh(arg_0);
+}
+
+@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/var/atanh/e3b450.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e36b362
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_atanh(arg_0);
+}
+
+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/var/atanh/e3b450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a96d584
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_atanh(arg_0);
+}
+
+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@0x000001C82047E7C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.glsl
new file mode 100644
index 0000000..160e464
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_atanh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_atanh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_atanh(arg_0);
+}
+
+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/var/atanh/e3b450.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.msl
new file mode 100644
index 0000000..70237ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#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 arg_0 = half4(0.0h);
+  half4 res = tint_atanh(arg_0);
+}
+
+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/var/atanh/e3b450.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.spvasm
new file mode 100644
index 0000000..b284d66
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %33 = 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
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %21
+        %res = OpVariable %_ptr_Function_v4half Function %21
+               OpStore %arg_0 %21
+         %31 = OpLoad %v4half %arg_0
+         %30 = OpFunctionCall %v4half %tint_atanh %31
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %atanh_e3b450
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %atanh_e3b450
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %atanh_e3b450
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.wgsl
new file mode 100644
index 0000000..c4fe719
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atanh_e3b450() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = atanh(arg_0);
+}
+
+@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/var/atanh/ec4b06.wgsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl
new file mode 100644
index 0000000..57babed
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = atanh(arg_0);
+}
+
+@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/var/atanh/ec4b06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f59fe90
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_atanh(arg_0);
+}
+
+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/var/atanh/ec4b06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c96a0ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_atanh(arg_0);
+}
+
+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@0x000002AC957584B0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.glsl
new file mode 100644
index 0000000..13d4a41
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_atanh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_atanh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_atanh(arg_0);
+}
+
+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/var/atanh/ec4b06.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.msl
new file mode 100644
index 0000000..6238a7d
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#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 arg_0 = half3(0.0h);
+  half3 res = tint_atanh(arg_0);
+}
+
+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/var/atanh/ec4b06.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.spvasm
new file mode 100644
index 0000000..c58d4e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %33 = 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
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %21
+        %res = OpVariable %_ptr_Function_v3half Function %21
+               OpStore %arg_0 %21
+         %31 = OpLoad %v3half %arg_0
+         %30 = OpFunctionCall %v3half %tint_atanh %31
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %atanh_ec4b06
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %atanh_ec4b06
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %atanh_ec4b06
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.wgsl
new file mode 100644
index 0000000..b22a682
--- /dev/null
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn atanh_ec4b06() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = atanh(arg_0);
+}
+
+@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/var/ceil/09bf52.wgsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl
new file mode 100644
index 0000000..a248d86
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = ceil(arg_0);
+}
+
+@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/var/ceil/09bf52.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f513773
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void ceil_09bf52() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = ceil(arg_0);
+}
+
+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/var/ceil/09bf52.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..75dab64
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void ceil_09bf52() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = ceil(arg_0);
+}
+
+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@0x000001A987B49660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A987B49660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.glsl
new file mode 100644
index 0000000..252778d
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_09bf52() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = ceil(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = ceil(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = ceil(arg_0);
+}
+
+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/var/ceil/09bf52.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.msl
new file mode 100644
index 0000000..9ee766b
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_09bf52() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = ceil(arg_0);
+}
+
+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/var/ceil/09bf52.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.spvasm
new file mode 100644
index 0000000..dcc2ae0
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %ceil_09bf52 "ceil_09bf52"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_09bf52 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Ceil %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %ceil_09bf52
+               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 %ceil_09bf52
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %ceil_09bf52
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.wgsl
new file mode 100644
index 0000000..c190c89
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn ceil_09bf52() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = ceil(arg_0);
+}
+
+@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/var/ceil/18c240.wgsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl
new file mode 100644
index 0000000..76d060c
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = ceil(arg_0);
+}
+
+@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/var/ceil/18c240.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5080e46
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void ceil_18c240() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = ceil(arg_0);
+}
+
+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/var/ceil/18c240.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c34ea03
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void ceil_18c240() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = ceil(arg_0);
+}
+
+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@0x000001F7F15A6FA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F7F15A6FA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.glsl
new file mode 100644
index 0000000..5b75aaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_18c240() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = ceil(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = ceil(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = ceil(arg_0);
+}
+
+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/var/ceil/18c240.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.msl
new file mode 100644
index 0000000..dab2bcc
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_18c240() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = ceil(arg_0);
+}
+
+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/var/ceil/18c240.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.spvasm
new file mode 100644
index 0000000..2bb39de
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %ceil_18c240 "ceil_18c240"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_18c240 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Ceil %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %ceil_18c240
+               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 %ceil_18c240
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %ceil_18c240
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.wgsl
new file mode 100644
index 0000000..aaf0fad
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn ceil_18c240() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = ceil(arg_0);
+}
+
+@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/var/ceil/4bca2a.wgsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl
new file mode 100644
index 0000000..28f5121
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = ceil(arg_0);
+}
+
+@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/var/ceil/4bca2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..804cde2
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void ceil_4bca2a() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = ceil(arg_0);
+}
+
+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/var/ceil/4bca2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c01139b
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void ceil_4bca2a() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = ceil(arg_0);
+}
+
+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@0x0000024CF8246830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CF8246830(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.glsl
new file mode 100644
index 0000000..d9ac78f
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_4bca2a() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = ceil(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = ceil(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = ceil(arg_0);
+}
+
+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/var/ceil/4bca2a.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.msl
new file mode 100644
index 0000000..82cc714
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_4bca2a() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = ceil(arg_0);
+}
+
+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/var/ceil/4bca2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.spvasm
new file mode 100644
index 0000000..e0f5dea
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %ceil_4bca2a "ceil_4bca2a"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_4bca2a = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Ceil %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %ceil_4bca2a
+               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 %ceil_4bca2a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %ceil_4bca2a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.wgsl
new file mode 100644
index 0000000..682d1c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn ceil_4bca2a() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = ceil(arg_0);
+}
+
+@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/var/ceil/f3f889.wgsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl
new file mode 100644
index 0000000..2053a50
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = ceil(arg_0);
+}
+
+@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/var/ceil/f3f889.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..03dab80
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void ceil_f3f889() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = ceil(arg_0);
+}
+
+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/var/ceil/f3f889.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ecdbf03
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void ceil_f3f889() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = ceil(arg_0);
+}
+
+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@0x000002391D5D1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002391D5D1160(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.glsl
new file mode 100644
index 0000000..3459b17
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_f3f889() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = ceil(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = ceil(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = ceil(arg_0);
+}
+
+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/var/ceil/f3f889.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.msl
new file mode 100644
index 0000000..48f8d6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_f3f889() {
+  half arg_0 = 0.0h;
+  half res = ceil(arg_0);
+}
+
+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/var/ceil/f3f889.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d48df9
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_f3f889 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Ceil %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %ceil_f3f889
+               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 %ceil_f3f889
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %ceil_f3f889
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.wgsl
new file mode 100644
index 0000000..d00960e
--- /dev/null
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn ceil_f3f889() {
+  var arg_0 = f16();
+  var res : f16 = ceil(arg_0);
+}
+
+@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/var/clamp/235b29.wgsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl
new file mode 100644
index 0000000..c77a340
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res: vec2<f16> = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/clamp/235b29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0bab035
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void clamp_235b29() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/235b29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1169ce4
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void clamp_235b29() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = clamp(arg_0, arg_1, arg_2);
+}
+
+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@0x0000024CD8072900(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.glsl
new file mode 100644
index 0000000..1921aab
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_235b29() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/235b29.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.msl
new file mode 100644
index 0000000..1d2f620
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_235b29() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 arg_2 = half2(0.0h);
+  half2 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/235b29.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.spvasm
new file mode 100644
index 0000000..c93b5b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %clamp_235b29 "clamp_235b29"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_235b29 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v2half %arg_0
+         %23 = OpLoad %v2half %arg_1
+         %24 = OpLoad %v2half %arg_2
+         %20 = OpExtInst %v2half %21 NClamp %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %clamp_235b29
+               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 %clamp_235b29
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %clamp_235b29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.wgsl
new file mode 100644
index 0000000..93013b2
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn clamp_235b29() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res : vec2<f16> = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/clamp/2c251b.wgsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl
new file mode 100644
index 0000000..95d83b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res: vec4<f16> = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/clamp/2c251b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..71ec4f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void clamp_2c251b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/2c251b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..946d07a
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void clamp_2c251b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = clamp(arg_0, arg_1, arg_2);
+}
+
+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@0x000001D56C1F9DE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.glsl
new file mode 100644
index 0000000..6c4f3c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_2c251b() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/2c251b.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.msl
new file mode 100644
index 0000000..b84d2b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_2c251b() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 arg_2 = half4(0.0h);
+  half4 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/2c251b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.spvasm
new file mode 100644
index 0000000..995110b
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %clamp_2c251b "clamp_2c251b"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_2c251b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v4half %arg_0
+         %23 = OpLoad %v4half %arg_1
+         %24 = OpLoad %v4half %arg_2
+         %20 = OpExtInst %v4half %21 NClamp %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %clamp_2c251b
+               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 %clamp_2c251b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %clamp_2c251b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.wgsl
new file mode 100644
index 0000000..66ca8c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn clamp_2c251b() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res : vec4<f16> = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/clamp/553ffb.wgsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl
new file mode 100644
index 0000000..accceec
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res: f16 = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/clamp/553ffb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3b9eae4
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void clamp_553ffb() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/553ffb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6c663b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void clamp_553ffb() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = clamp(arg_0, arg_1, arg_2);
+}
+
+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@0x0000022BE4491540(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022BE4491540(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.glsl
new file mode 100644
index 0000000..30b888f
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_553ffb() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/553ffb.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.msl
new file mode 100644
index 0000000..27aaf05
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_553ffb() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half arg_2 = 0.0h;
+  half res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/553ffb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.spvasm
new file mode 100644
index 0000000..4254790
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %clamp_553ffb "clamp_553ffb"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_553ffb = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+      %arg_2 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+               OpStore %arg_2 %14
+         %21 = OpLoad %half %arg_0
+         %22 = OpLoad %half %arg_1
+         %23 = OpLoad %half %arg_2
+         %19 = OpExtInst %half %20 NClamp %21 %22 %23
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %clamp_553ffb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %clamp_553ffb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %clamp_553ffb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.wgsl
new file mode 100644
index 0000000..875ec68
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn clamp_553ffb() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res : f16 = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/clamp/b195eb.wgsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl
new file mode 100644
index 0000000..b0680c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res: vec3<f16> = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/clamp/b195eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..51d3bc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void clamp_b195eb() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/b195eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..87a16e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void clamp_b195eb() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = clamp(arg_0, arg_1, arg_2);
+}
+
+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@0x000002017A6F3930(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.glsl
new file mode 100644
index 0000000..d1d0084
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_b195eb() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/b195eb.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.msl
new file mode 100644
index 0000000..3bedc87
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_b195eb() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 arg_2 = half3(0.0h);
+  half3 res = clamp(arg_0, arg_1, arg_2);
+}
+
+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/var/clamp/b195eb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.spvasm
new file mode 100644
index 0000000..2383ac6
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %clamp_b195eb "clamp_b195eb"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_b195eb = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v3half %arg_0
+         %23 = OpLoad %v3half %arg_1
+         %24 = OpLoad %v3half %arg_2
+         %20 = OpExtInst %v3half %21 NClamp %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %clamp_b195eb
+               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 %clamp_b195eb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %clamp_b195eb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.wgsl
new file mode 100644
index 0000000..7baa8c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn clamp_b195eb() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res : vec3<f16> = clamp(arg_0, arg_1, arg_2);
+}
+
+@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/var/cos/0835a8.wgsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl
new file mode 100644
index 0000000..305a93e
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = cos(arg_0);
+}
+
+@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/var/cos/0835a8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cced281
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cos_0835a8() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = cos(arg_0);
+}
+
+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/var/cos/0835a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a8d875
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cos_0835a8() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = cos(arg_0);
+}
+
+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@0x0000026FB6F714B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB6F714B0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.glsl
new file mode 100644
index 0000000..bafe1a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_0835a8() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = cos(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = cos(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = cos(arg_0);
+}
+
+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/var/cos/0835a8.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.msl
new file mode 100644
index 0000000..9420e0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_0835a8() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = cos(arg_0);
+}
+
+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/var/cos/0835a8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.spvasm
new file mode 100644
index 0000000..9ae25ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %cos_0835a8 "cos_0835a8"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_0835a8 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Cos %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %cos_0835a8
+               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 %cos_0835a8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %cos_0835a8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.wgsl
new file mode 100644
index 0000000..9646c47
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cos_0835a8() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = cos(arg_0);
+}
+
+@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/var/cos/0a89f7.wgsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl
new file mode 100644
index 0000000..57ead0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = cos(arg_0);
+}
+
+@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/var/cos/0a89f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3d47a4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cos_0a89f7() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = cos(arg_0);
+}
+
+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/var/cos/0a89f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..01410b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cos_0a89f7() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = cos(arg_0);
+}
+
+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@0x0000012D2C4B1DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012D2C4B1DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.glsl
new file mode 100644
index 0000000..ba601e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_0a89f7() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = cos(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = cos(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = cos(arg_0);
+}
+
+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/var/cos/0a89f7.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.msl
new file mode 100644
index 0000000..82d913d
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_0a89f7() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = cos(arg_0);
+}
+
+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/var/cos/0a89f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.spvasm
new file mode 100644
index 0000000..c2987df
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %cos_0a89f7 "cos_0a89f7"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_0a89f7 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Cos %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %cos_0a89f7
+               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 %cos_0a89f7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %cos_0a89f7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d809bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cos_0a89f7() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = cos(arg_0);
+}
+
+@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/var/cos/5bc2c6.wgsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl
new file mode 100644
index 0000000..f539734
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = cos(arg_0);
+}
+
+@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/var/cos/5bc2c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..09dad0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cos_5bc2c6() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = cos(arg_0);
+}
+
+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/var/cos/5bc2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..856b91f
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cos_5bc2c6() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = cos(arg_0);
+}
+
+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@0x0000021A2289CA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021A2289CA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.glsl
new file mode 100644
index 0000000..511a507
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_5bc2c6() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = cos(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = cos(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = cos(arg_0);
+}
+
+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/var/cos/5bc2c6.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.msl
new file mode 100644
index 0000000..0eb3596
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_5bc2c6() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = cos(arg_0);
+}
+
+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/var/cos/5bc2c6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.spvasm
new file mode 100644
index 0000000..e3000bb
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %cos_5bc2c6 "cos_5bc2c6"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_5bc2c6 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Cos %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %cos_5bc2c6
+               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 %cos_5bc2c6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %cos_5bc2c6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.wgsl
new file mode 100644
index 0000000..f5711b7
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cos_5bc2c6() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = cos(arg_0);
+}
+
+@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/var/cos/fc047d.wgsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl
new file mode 100644
index 0000000..0daf862
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = cos(arg_0);
+}
+
+@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/var/cos/fc047d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..54b9f70
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cos_fc047d() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = cos(arg_0);
+}
+
+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/var/cos/fc047d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fb57ccb
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cos_fc047d() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = cos(arg_0);
+}
+
+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@0x0000023368939570(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023368939570(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.glsl
new file mode 100644
index 0000000..093b9d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_fc047d() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = cos(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = cos(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = cos(arg_0);
+}
+
+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/var/cos/fc047d.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.msl
new file mode 100644
index 0000000..2c230eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_fc047d() {
+  half arg_0 = 0.0h;
+  half res = cos(arg_0);
+}
+
+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/var/cos/fc047d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.spvasm
new file mode 100644
index 0000000..4adfb5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_fc047d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Cos %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %cos_fc047d
+               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 %cos_fc047d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %cos_fc047d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.wgsl
new file mode 100644
index 0000000..2230ba2
--- /dev/null
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cos_fc047d() {
+  var arg_0 = f16();
+  var res : f16 = cos(arg_0);
+}
+
+@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/var/cosh/2ed778.wgsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl
new file mode 100644
index 0000000..b1f69a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = cosh(arg_0);
+}
+
+@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/var/cosh/2ed778.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6689a7f
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cosh_2ed778() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = cosh(arg_0);
+}
+
+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/var/cosh/2ed778.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..daec563
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cosh_2ed778() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = cosh(arg_0);
+}
+
+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@0x0000025119222EB0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025119222EB0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.glsl
new file mode 100644
index 0000000..52057b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_2ed778() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = cosh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = cosh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = cosh(arg_0);
+}
+
+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/var/cosh/2ed778.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.msl
new file mode 100644
index 0000000..6f72358
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_2ed778() {
+  half arg_0 = 0.0h;
+  half res = cosh(arg_0);
+}
+
+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/var/cosh/2ed778.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.spvasm
new file mode 100644
index 0000000..2079d7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_2ed778 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Cosh %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %cosh_2ed778
+               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 %cosh_2ed778
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %cosh_2ed778
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.wgsl
new file mode 100644
index 0000000..4d56705
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cosh_2ed778() {
+  var arg_0 = f16();
+  var res : f16 = cosh(arg_0);
+}
+
+@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/var/cosh/3b7bbf.wgsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl
new file mode 100644
index 0000000..133748a
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = cosh(arg_0);
+}
+
+@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/var/cosh/3b7bbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5a96478
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cosh_3b7bbf() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = cosh(arg_0);
+}
+
+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/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5838354
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cosh_3b7bbf() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = cosh(arg_0);
+}
+
+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@0x0000023E2A2C07F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023E2A2C07F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.glsl
new file mode 100644
index 0000000..8ea08d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_3b7bbf() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = cosh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = cosh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = cosh(arg_0);
+}
+
+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/var/cosh/3b7bbf.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.msl
new file mode 100644
index 0000000..12acf5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_3b7bbf() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = cosh(arg_0);
+}
+
+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/var/cosh/3b7bbf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.spvasm
new file mode 100644
index 0000000..3b9f8d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %cosh_3b7bbf "cosh_3b7bbf"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_3b7bbf = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Cosh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %cosh_3b7bbf
+               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 %cosh_3b7bbf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %cosh_3b7bbf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.wgsl
new file mode 100644
index 0000000..06d346d
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cosh_3b7bbf() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = cosh(arg_0);
+}
+
+@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/var/cosh/43b672.wgsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl
new file mode 100644
index 0000000..a1e32ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = cosh(arg_0);
+}
+
+@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/var/cosh/43b672.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..db19b27
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cosh_43b672() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = cosh(arg_0);
+}
+
+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/var/cosh/43b672.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a35fa62
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cosh_43b672() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = cosh(arg_0);
+}
+
+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@0x00000244BAA52310(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000244BAA52310(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.glsl
new file mode 100644
index 0000000..8c60a2c
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_43b672() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = cosh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = cosh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = cosh(arg_0);
+}
+
+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/var/cosh/43b672.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.msl
new file mode 100644
index 0000000..1a50e7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_43b672() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = cosh(arg_0);
+}
+
+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/var/cosh/43b672.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.spvasm
new file mode 100644
index 0000000..5658285
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %cosh_43b672 "cosh_43b672"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_43b672 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Cosh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %cosh_43b672
+               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 %cosh_43b672
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %cosh_43b672
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.wgsl
new file mode 100644
index 0000000..979119f
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cosh_43b672() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = cosh(arg_0);
+}
+
+@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/var/cosh/b1b8a0.wgsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl
new file mode 100644
index 0000000..10b551b
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = cosh(arg_0);
+}
+
+@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/var/cosh/b1b8a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a058cd2
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void cosh_b1b8a0() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = cosh(arg_0);
+}
+
+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/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..86a786d
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void cosh_b1b8a0() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = cosh(arg_0);
+}
+
+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@0x0000018FD1882B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FD1882B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.glsl
new file mode 100644
index 0000000..6566e92
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_b1b8a0() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = cosh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = cosh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = cosh(arg_0);
+}
+
+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/var/cosh/b1b8a0.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.msl
new file mode 100644
index 0000000..2cf0802
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_b1b8a0() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = cosh(arg_0);
+}
+
+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/var/cosh/b1b8a0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.spvasm
new file mode 100644
index 0000000..29505ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %cosh_b1b8a0 "cosh_b1b8a0"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_b1b8a0 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Cosh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %cosh_b1b8a0
+               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 %cosh_b1b8a0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %cosh_b1b8a0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.wgsl
new file mode 100644
index 0000000..273765b
--- /dev/null
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn cosh_b1b8a0() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = cosh(arg_0);
+}
+
+@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/var/cross/9857cb.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl
new file mode 100644
index 0000000..39258c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>();
+  var arg_1 = vec3<f16>();
+  var res: vec3<f16> = cross(arg_0, arg_1);
+}
+
+@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/var/cross/9857cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fdb9f03
--- /dev/null
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void cross_9857cb() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = cross(arg_0, arg_1);
+}
+
+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/var/cross/9857cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9c32ca7
--- /dev/null
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void cross_9857cb() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = cross(arg_0, arg_1);
+}
+
+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@0x0000018E1A1D1BC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.glsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.glsl
new file mode 100644
index 0000000..8d62b40
--- /dev/null
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cross_9857cb() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = cross(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = cross(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = cross(arg_0, arg_1);
+}
+
+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/var/cross/9857cb.wgsl.expected.msl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.msl
new file mode 100644
index 0000000..23ad005
--- /dev/null
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cross_9857cb() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 res = cross(arg_0, arg_1);
+}
+
+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/var/cross/9857cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..3f88a0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %cross_9857cb "cross_9857cb"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cross_9857cb = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %v3half %20 Cross %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %cross_9857cb
+               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 %cross_9857cb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %cross_9857cb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..c249f4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn cross_9857cb() {
+  var arg_0 = vec3<f16>();
+  var arg_1 = vec3<f16>();
+  var res : vec3<f16> = cross(arg_0, arg_1);
+}
+
+@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/var/degrees/3055d3.wgsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl
new file mode 100644
index 0000000..2ccb71f
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = degrees(arg_0);
+}
+
+@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/var/degrees/3055d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b7a4b58
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+vector<float16_t, 4> tint_degrees(vector<float16_t, 4> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_3055d3() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_degrees(arg_0);
+}
+
+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/var/degrees/3055d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dc4b54a
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_degrees(arg_0);
+}
+
+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@0x00000151C0FBF8C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.glsl
new file mode 100644
index 0000000..8a05103
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_degrees(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_degrees(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_degrees(arg_0);
+}
+
+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/var/degrees/3055d3.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.msl
new file mode 100644
index 0000000..e4ca478
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half4 tint_degrees(half4 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_3055d3() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = tint_degrees(arg_0);
+}
+
+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/var/degrees/3055d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..2604fcf
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %degrees_3055d3 "degrees_3055d3"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_3055d3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Degrees %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %degrees_3055d3
+               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 %degrees_3055d3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %degrees_3055d3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..284c1c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn degrees_3055d3() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = degrees(arg_0);
+}
+
+@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/var/degrees/5e9805.wgsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl
new file mode 100644
index 0000000..3b13f5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = degrees(arg_0);
+}
+
+@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/var/degrees/5e9805.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b23805c
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+float16_t tint_degrees(float16_t param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_5e9805() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_degrees(arg_0);
+}
+
+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/var/degrees/5e9805.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..32b3d34
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+float16_t tint_degrees(float16_t param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_5e9805() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_degrees(arg_0);
+}
+
+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@0x0000020047AF8DA0(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.glsl
new file mode 100644
index 0000000..69aaca4
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = 0.0hf;
+  float16_t res = tint_degrees(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_degrees(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_degrees(arg_0);
+}
+
+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/var/degrees/5e9805.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.msl
new file mode 100644
index 0000000..6639be5
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half tint_degrees(half param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_5e9805() {
+  half arg_0 = 0.0h;
+  half res = tint_degrees(arg_0);
+}
+
+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/var/degrees/5e9805.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.spvasm
new file mode 100644
index 0000000..bb16620
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_5e9805 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Degrees %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %degrees_5e9805
+               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 %degrees_5e9805
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %degrees_5e9805
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d9e554
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn degrees_5e9805() {
+  var arg_0 = f16();
+  var res : f16 = degrees(arg_0);
+}
+
+@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/var/degrees/dfe8f4.wgsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl
new file mode 100644
index 0000000..6cd4a1d
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = degrees(arg_0);
+}
+
+@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/var/degrees/dfe8f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..392869b
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+vector<float16_t, 3> tint_degrees(vector<float16_t, 3> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_dfe8f4() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_degrees(arg_0);
+}
+
+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/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5066e38
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_degrees(arg_0);
+}
+
+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@0x00000192E8B81620(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.glsl
new file mode 100644
index 0000000..d82db9e
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_degrees(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_degrees(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_degrees(arg_0);
+}
+
+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/var/degrees/dfe8f4.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.msl
new file mode 100644
index 0000000..cf288cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half3 tint_degrees(half3 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_dfe8f4() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = tint_degrees(arg_0);
+}
+
+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/var/degrees/dfe8f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..3216613
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %degrees_dfe8f4 "degrees_dfe8f4"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_dfe8f4 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Degrees %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %degrees_dfe8f4
+               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 %degrees_dfe8f4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %degrees_dfe8f4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..3ec216f
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn degrees_dfe8f4() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = degrees(arg_0);
+}
+
+@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/var/degrees/f59715.wgsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl
new file mode 100644
index 0000000..a091857
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = degrees(arg_0);
+}
+
+@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/var/degrees/f59715.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2bf6ba7
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+vector<float16_t, 2> tint_degrees(vector<float16_t, 2> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_f59715() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_degrees(arg_0);
+}
+
+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/var/degrees/f59715.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b378860
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_degrees(arg_0);
+}
+
+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@0x0000022454CA0150(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.glsl
new file mode 100644
index 0000000..0273ac4
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_degrees(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_degrees(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_degrees(arg_0);
+}
+
+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/var/degrees/f59715.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.msl
new file mode 100644
index 0000000..a454ff0
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half2 tint_degrees(half2 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_f59715() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = tint_degrees(arg_0);
+}
+
+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/var/degrees/f59715.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.spvasm
new file mode 100644
index 0000000..dfdcb24
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %degrees_f59715 "degrees_f59715"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_f59715 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Degrees %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %degrees_f59715
+               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 %degrees_f59715
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %degrees_f59715
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.wgsl
new file mode 100644
index 0000000..b3a6abf
--- /dev/null
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn degrees_f59715() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = degrees(arg_0);
+}
+
+@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/var/determinant/32bfde.wgsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl
new file mode 100644
index 0000000..fd0a38e
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: f16 = determinant(arg_0);
+}
+
+@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/var/determinant/32bfde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..21bb924
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void determinant_32bfde() {
+  matrix<float16_t, 4, 4> arg_0 = 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);
+  float16_t res = determinant(arg_0);
+}
+
+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/var/determinant/32bfde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3db7954
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void determinant_32bfde() {
+  matrix<float16_t, 4, 4> arg_0 = 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);
+  float16_t res = determinant(arg_0);
+}
+
+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@0x0000022F54326C80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(3,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(3,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.glsl
new file mode 100644
index 0000000..2edc4db
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_32bfde() {
+  f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+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() {
+  f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+void fragment_main() {
+  determinant_32bfde();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_32bfde() {
+  f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+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/var/determinant/32bfde.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.msl
new file mode 100644
index 0000000..2398440
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void determinant_32bfde() {
+  half4x4 arg_0 = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h));
+  half res = determinant(arg_0);
+}
+
+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/var/determinant/32bfde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.spvasm
new file mode 100644
index 0000000..3af3168
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %determinant_32bfde "determinant_32bfde"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat4v4half
+%_ptr_Function_mat4v4half = OpTypePointer Function %mat4v4half
+%_ptr_Function_half = OpTypePointer Function %half
+         %24 = OpConstantNull %half
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%determinant_32bfde = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat4v4half Function %16
+        %res = OpVariable %_ptr_Function_half Function %24
+               OpStore %arg_0 %16
+         %21 = OpLoad %mat4v4half %arg_0
+         %19 = OpExtInst %half %20 Determinant %21
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %determinant_32bfde
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %determinant_32bfde
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %determinant_32bfde
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.wgsl
new file mode 100644
index 0000000..c0fcade
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn determinant_32bfde() {
+  var arg_0 = mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : f16 = determinant(arg_0);
+}
+
+@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/var/determinant/d7c86f.wgsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl
new file mode 100644
index 0000000..b071018
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: f16 = determinant(arg_0);
+}
+
+@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/var/determinant/d7c86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..899cb34
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void determinant_d7c86f() {
+  matrix<float16_t, 3, 3> arg_0 = matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+  float16_t res = determinant(arg_0);
+}
+
+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/var/determinant/d7c86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d769802
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void determinant_d7c86f() {
+  matrix<float16_t, 3, 3> arg_0 = matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+  float16_t res = determinant(arg_0);
+}
+
+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@0x000001C5F7AE5180(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(3,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(3,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.glsl
new file mode 100644
index 0000000..9718310
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_d7c86f() {
+  f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+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() {
+  f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+void fragment_main() {
+  determinant_d7c86f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_d7c86f() {
+  f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+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/var/determinant/d7c86f.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.msl
new file mode 100644
index 0000000..a3b282f
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void determinant_d7c86f() {
+  half3x3 arg_0 = half3x3(half3(0.0h), half3(0.0h), half3(0.0h));
+  half res = determinant(arg_0);
+}
+
+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/var/determinant/d7c86f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.spvasm
new file mode 100644
index 0000000..0540412
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %determinant_d7c86f "determinant_d7c86f"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat3v3half
+%_ptr_Function_mat3v3half = OpTypePointer Function %mat3v3half
+%_ptr_Function_half = OpTypePointer Function %half
+         %24 = OpConstantNull %half
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%determinant_d7c86f = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat3v3half Function %16
+        %res = OpVariable %_ptr_Function_half Function %24
+               OpStore %arg_0 %16
+         %21 = OpLoad %mat3v3half %arg_0
+         %19 = OpExtInst %half %20 Determinant %21
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %determinant_d7c86f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %determinant_d7c86f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %determinant_d7c86f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.wgsl
new file mode 100644
index 0000000..aae4d08
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn determinant_d7c86f() {
+  var arg_0 = mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : f16 = determinant(arg_0);
+}
+
+@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/var/determinant/fc12a5.wgsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl
new file mode 100644
index 0000000..bcb0f6e
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat2x2<f16>(f16(), f16(), f16(), f16());
+  var res: f16 = determinant(arg_0);
+}
+
+@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/var/determinant/fc12a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..46328d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void determinant_fc12a5() {
+  matrix<float16_t, 2, 2> arg_0 = matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+  float16_t res = determinant(arg_0);
+}
+
+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/var/determinant/fc12a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a06af79
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void determinant_fc12a5() {
+  matrix<float16_t, 2, 2> arg_0 = matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+  float16_t res = determinant(arg_0);
+}
+
+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@0x0000022674B2E9D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(3,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(3,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.glsl
new file mode 100644
index 0000000..a8dbfa6
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_fc12a5() {
+  f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+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() {
+  f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+void fragment_main() {
+  determinant_fc12a5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_fc12a5() {
+  f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
+  float16_t res = determinant(arg_0);
+}
+
+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/var/determinant/fc12a5.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.msl
new file mode 100644
index 0000000..2e6b14e
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void determinant_fc12a5() {
+  half2x2 arg_0 = half2x2(half2(0.0h), half2(0.0h));
+  half res = determinant(arg_0);
+}
+
+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/var/determinant/fc12a5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.spvasm
new file mode 100644
index 0000000..1141730
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %determinant_fc12a5 "determinant_fc12a5"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat2v2half
+%_ptr_Function_mat2v2half = OpTypePointer Function %mat2v2half
+%_ptr_Function_half = OpTypePointer Function %half
+         %24 = OpConstantNull %half
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%determinant_fc12a5 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat2v2half Function %16
+        %res = OpVariable %_ptr_Function_half Function %24
+               OpStore %arg_0 %16
+         %21 = OpLoad %mat2v2half %arg_0
+         %19 = OpExtInst %half %20 Determinant %21
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %determinant_fc12a5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %determinant_fc12a5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %determinant_fc12a5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.wgsl
new file mode 100644
index 0000000..225d3cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn determinant_fc12a5() {
+  var arg_0 = mat2x2<f16>(f16(), f16(), f16(), f16());
+  var res : f16 = determinant(arg_0);
+}
+
+@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/var/distance/7272f3.wgsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl
new file mode 100644
index 0000000..f8aad30
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: f16 = distance(arg_0, arg_1);
+}
+
+@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/var/distance/7272f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b62fdc
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void distance_7272f3() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/7272f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..019f6af
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void distance_7272f3() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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@0x000001EADAF82D50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(4,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.glsl
new file mode 100644
index 0000000..16eba83
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_7272f3() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+void fragment_main() {
+  distance_7272f3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_7272f3() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/7272f3.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.msl
new file mode 100644
index 0000000..24a1476
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_7272f3() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half res = distance(arg_0, arg_1);
+}
+
+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/var/distance/7272f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..967f8ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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 %distance_7272f3 "distance_7272f3"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %25 = OpConstantNull %half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_7272f3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_half Function %25
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v4half %arg_0
+         %22 = OpLoad %v4half %arg_1
+         %19 = OpExtInst %half %20 Distance %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %distance_7272f3
+               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 %distance_7272f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %distance_7272f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..3689ad7
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn distance_7272f3() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : f16 = distance(arg_0, arg_1);
+}
+
+@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/var/distance/7d201f.wgsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl
new file mode 100644
index 0000000..a66064c
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var res: f16 = distance(arg_0, arg_1);
+}
+
+@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/var/distance/7d201f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e83ccf1
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void distance_7d201f() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/7d201f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..42c0407
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void distance_7d201f() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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@0x0000020A788F9640(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A788F9640(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.glsl
new file mode 100644
index 0000000..0ed25e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_7d201f() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/7d201f.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.msl
new file mode 100644
index 0000000..780d62e
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_7d201f() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half res = fabs(arg_0 - arg_1);
+}
+
+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/var/distance/7d201f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.spvasm
new file mode 100644
index 0000000..b39b43c
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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 %distance_7d201f "distance_7d201f"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_7d201f = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+         %20 = OpLoad %half %arg_0
+         %21 = OpLoad %half %arg_1
+         %18 = OpExtInst %half %19 Distance %20 %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %distance_7d201f
+               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 %distance_7d201f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %distance_7d201f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.wgsl
new file mode 100644
index 0000000..4480b58
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn distance_7d201f() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var res : f16 = distance(arg_0, arg_1);
+}
+
+@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/var/distance/892a5d.wgsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl
new file mode 100644
index 0000000..2a5c208
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: f16 = distance(arg_0, arg_1);
+}
+
+@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/var/distance/892a5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..034e57e
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void distance_892a5d() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/892a5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e6d94bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void distance_892a5d() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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@0x000001FA47782B40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(4,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.glsl
new file mode 100644
index 0000000..a615b6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_892a5d() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+void fragment_main() {
+  distance_892a5d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_892a5d() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/892a5d.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.msl
new file mode 100644
index 0000000..8fe755d
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_892a5d() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half res = distance(arg_0, arg_1);
+}
+
+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/var/distance/892a5d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.spvasm
new file mode 100644
index 0000000..59a5d06
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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 %distance_892a5d "distance_892a5d"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %25 = OpConstantNull %half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_892a5d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_half Function %25
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v2half %arg_0
+         %22 = OpLoad %v2half %arg_1
+         %19 = OpExtInst %half %20 Distance %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %distance_892a5d
+               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 %distance_892a5d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %distance_892a5d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.wgsl
new file mode 100644
index 0000000..279adaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn distance_892a5d() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : f16 = distance(arg_0, arg_1);
+}
+
+@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/var/distance/928fa0.wgsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl
new file mode 100644
index 0000000..83a533b
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: f16 = distance(arg_0, arg_1);
+}
+
+@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/var/distance/928fa0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..097d7b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void distance_928fa0() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/928fa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..354f95e
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void distance_928fa0() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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@0x00000277E5AD2CF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(4,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.glsl
new file mode 100644
index 0000000..77dd598
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_928fa0() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+void fragment_main() {
+  distance_928fa0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_928fa0() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t res = distance(arg_0, arg_1);
+}
+
+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/var/distance/928fa0.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.msl
new file mode 100644
index 0000000..b2a96ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_928fa0() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half res = distance(arg_0, arg_1);
+}
+
+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/var/distance/928fa0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.spvasm
new file mode 100644
index 0000000..9696539
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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 %distance_928fa0 "distance_928fa0"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %25 = OpConstantNull %half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_928fa0 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_half Function %25
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %half %20 Distance %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %distance_928fa0
+               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 %distance_928fa0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %distance_928fa0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.wgsl
new file mode 100644
index 0000000..840d9e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn distance_928fa0() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : f16 = distance(arg_0, arg_1);
+}
+
+@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/var/dot/8e40f1.wgsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl
new file mode 100644
index 0000000..eceecd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: f16 = dot(arg_0, arg_1);
+}
+
+@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/var/dot/8e40f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ad11be2
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void dot_8e40f1() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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/var/dot/8e40f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ad26057
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void dot_8e40f1() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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@0x0000018A9A333310(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(4,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.glsl
new file mode 100644
index 0000000..18066bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_8e40f1() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+void fragment_main() {
+  dot_8e40f1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_8e40f1() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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/var/dot/8e40f1.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.msl
new file mode 100644
index 0000000..eacb81c
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void dot_8e40f1() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half res = dot(arg_0, arg_1);
+}
+
+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/var/dot/8e40f1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.spvasm
new file mode 100644
index 0000000..6bed79d
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %24 = OpConstantNull %half
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %dot_8e40f1 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_half Function %24
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %20 = OpLoad %v3half %arg_0
+         %21 = OpLoad %v3half %arg_1
+         %19 = OpDot %half %20 %21
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %dot_8e40f1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %dot_8e40f1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %dot_8e40f1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.wgsl
new file mode 100644
index 0000000..db92b08
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn dot_8e40f1() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : f16 = dot(arg_0, arg_1);
+}
+
+@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/var/dot/cd5a04.wgsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl
new file mode 100644
index 0000000..9226d5c
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: f16 = dot(arg_0, arg_1);
+}
+
+@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/var/dot/cd5a04.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..27c17be
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void dot_cd5a04() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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/var/dot/cd5a04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2a3cca8
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void dot_cd5a04() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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@0x0000020151407920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(4,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.glsl
new file mode 100644
index 0000000..03060ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_cd5a04() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+void fragment_main() {
+  dot_cd5a04();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_cd5a04() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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/var/dot/cd5a04.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.msl
new file mode 100644
index 0000000..b70c4db
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void dot_cd5a04() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half res = dot(arg_0, arg_1);
+}
+
+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/var/dot/cd5a04.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.spvasm
new file mode 100644
index 0000000..9cef5f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %24 = OpConstantNull %half
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %dot_cd5a04 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_half Function %24
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %20 = OpLoad %v2half %arg_0
+         %21 = OpLoad %v2half %arg_1
+         %19 = OpDot %half %20 %21
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %dot_cd5a04
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %dot_cd5a04
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %dot_cd5a04
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.wgsl
new file mode 100644
index 0000000..8fc1a17
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn dot_cd5a04() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : f16 = dot(arg_0, arg_1);
+}
+
+@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/var/dot/d0d179.wgsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl
new file mode 100644
index 0000000..972ce43
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: f16 = dot(arg_0, arg_1);
+}
+
+@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/var/dot/d0d179.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e6a5b4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void dot_d0d179() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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/var/dot/d0d179.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..67a0bee
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void dot_d0d179() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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@0x0000019F987BD460(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(4,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.glsl
new file mode 100644
index 0000000..fd6939c
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_d0d179() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+void fragment_main() {
+  dot_d0d179();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_d0d179() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t res = dot(arg_0, arg_1);
+}
+
+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/var/dot/d0d179.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.msl
new file mode 100644
index 0000000..4a83867
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void dot_d0d179() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half res = dot(arg_0, arg_1);
+}
+
+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/var/dot/d0d179.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.spvasm
new file mode 100644
index 0000000..5bca828
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %24 = OpConstantNull %half
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %dot_d0d179 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_half Function %24
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %20 = OpLoad %v4half %arg_0
+         %21 = OpLoad %v4half %arg_1
+         %19 = OpDot %half %20 %21
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %dot_d0d179
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %dot_d0d179
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %dot_d0d179
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.wgsl
new file mode 100644
index 0000000..3297912
--- /dev/null
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn dot_d0d179() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : f16 = dot(arg_0, arg_1);
+}
+
+@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/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
index b5bc698..733f9e5 100644
--- a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
@@ -37,3 +37,6 @@
   dot4I8Packed_881e62();
   return;
 }
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A416C12830(3,10-56): error X3004: undeclared identifier 'dot4add_i8packed'
+
diff --git a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
index fb71ba6..fef2404 100644
--- a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
@@ -37,3 +37,6 @@
   dot4U8Packed_fbed7b();
   return;
 }
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000191724B1570(3,10-56): error X3004: undeclared identifier 'dot4add_u8packed'
+
diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl b/test/tint/builtins/gen/var/exp/13806d.wgsl
new file mode 100644
index 0000000..6c3ccde
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = exp(arg_0);
+}
+
+@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/var/exp/13806d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eb7e5a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp_13806d() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = exp(arg_0);
+}
+
+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/var/exp/13806d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ebcc65f
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp_13806d() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = exp(arg_0);
+}
+
+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@0x000002270EAE6F40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002270EAE6F40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.glsl
new file mode 100644
index 0000000..72d5c8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_13806d() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = exp(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = exp(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = exp(arg_0);
+}
+
+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/var/exp/13806d.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.msl
new file mode 100644
index 0000000..891a68a
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_13806d() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = exp(arg_0);
+}
+
+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/var/exp/13806d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.spvasm
new file mode 100644
index 0000000..90c0537
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %exp_13806d "exp_13806d"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_13806d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Exp %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %exp_13806d
+               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 %exp_13806d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %exp_13806d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.wgsl
new file mode 100644
index 0000000..044b03a
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp_13806d() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = exp(arg_0);
+}
+
+@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/var/exp/2e08e2.wgsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl
new file mode 100644
index 0000000..15f67b1
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = exp(arg_0);
+}
+
+@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/var/exp/2e08e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e9d1413
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp_2e08e2() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = exp(arg_0);
+}
+
+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/var/exp/2e08e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0f2359d
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp_2e08e2() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = exp(arg_0);
+}
+
+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@0x00000256E60D6F90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256E60D6F90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.glsl
new file mode 100644
index 0000000..f53e9a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_2e08e2() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = exp(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = exp(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = exp(arg_0);
+}
+
+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/var/exp/2e08e2.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.msl
new file mode 100644
index 0000000..cc29327
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_2e08e2() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = exp(arg_0);
+}
+
+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/var/exp/2e08e2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.spvasm
new file mode 100644
index 0000000..6c662e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %exp_2e08e2 "exp_2e08e2"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_2e08e2 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Exp %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %exp_2e08e2
+               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 %exp_2e08e2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %exp_2e08e2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.wgsl
new file mode 100644
index 0000000..c041e1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp_2e08e2() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = exp(arg_0);
+}
+
+@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/var/exp/611a87.wgsl b/test/tint/builtins/gen/var/exp/611a87.wgsl
new file mode 100644
index 0000000..86e69d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = exp(arg_0);
+}
+
+@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/var/exp/611a87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b99c78
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp_611a87() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = exp(arg_0);
+}
+
+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/var/exp/611a87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..30ab783
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp_611a87() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = exp(arg_0);
+}
+
+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@0x000002855D95D650(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002855D95D650(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.glsl
new file mode 100644
index 0000000..ed49b7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_611a87() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = exp(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = exp(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = exp(arg_0);
+}
+
+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/var/exp/611a87.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.msl
new file mode 100644
index 0000000..dd3d353
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_611a87() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = exp(arg_0);
+}
+
+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/var/exp/611a87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.spvasm
new file mode 100644
index 0000000..17d3daf
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %exp_611a87 "exp_611a87"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_611a87 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Exp %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %exp_611a87
+               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 %exp_611a87
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %exp_611a87
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.wgsl
new file mode 100644
index 0000000..d208a93
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp_611a87() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = exp(arg_0);
+}
+
+@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/var/exp/c18fe9.wgsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl
new file mode 100644
index 0000000..e28c16a
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = exp(arg_0);
+}
+
+@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/var/exp/c18fe9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c137c9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp_c18fe9() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = exp(arg_0);
+}
+
+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/var/exp/c18fe9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ad6ebca
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp_c18fe9() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = exp(arg_0);
+}
+
+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@0x000002AE86501340(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE86501340(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.glsl
new file mode 100644
index 0000000..73b9ba1
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_c18fe9() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = exp(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = exp(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = exp(arg_0);
+}
+
+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/var/exp/c18fe9.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.msl
new file mode 100644
index 0000000..6bcb8c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_c18fe9() {
+  half arg_0 = 0.0h;
+  half res = exp(arg_0);
+}
+
+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/var/exp/c18fe9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.spvasm
new file mode 100644
index 0000000..8575fb8
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_c18fe9 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Exp %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %exp_c18fe9
+               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 %exp_c18fe9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %exp_c18fe9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.wgsl
new file mode 100644
index 0000000..3daf44c
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp_c18fe9() {
+  var arg_0 = f16();
+  var res : f16 = exp(arg_0);
+}
+
+@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/var/exp2/151a4c.wgsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl
new file mode 100644
index 0000000..5a42f5b
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = exp2(arg_0);
+}
+
+@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/var/exp2/151a4c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d1633f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp2_151a4c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = exp2(arg_0);
+}
+
+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/var/exp2/151a4c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aaf1ee1
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp2_151a4c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = exp2(arg_0);
+}
+
+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@0x0000027F32148910(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F32148910(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.glsl
new file mode 100644
index 0000000..a3e4e93
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_151a4c() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = exp2(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = exp2(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = exp2(arg_0);
+}
+
+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/var/exp2/151a4c.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.msl
new file mode 100644
index 0000000..26b057c
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_151a4c() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = exp2(arg_0);
+}
+
+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/var/exp2/151a4c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.spvasm
new file mode 100644
index 0000000..7db1e64
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %exp2_151a4c "exp2_151a4c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_151a4c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Exp2 %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %exp2_151a4c
+               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 %exp2_151a4c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %exp2_151a4c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.wgsl
new file mode 100644
index 0000000..33f0c7f
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp2_151a4c() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = exp2(arg_0);
+}
+
+@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/var/exp2/751377.wgsl b/test/tint/builtins/gen/var/exp2/751377.wgsl
new file mode 100644
index 0000000..9f15ce7
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = exp2(arg_0);
+}
+
+@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/var/exp2/751377.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e6251d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp2_751377() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = exp2(arg_0);
+}
+
+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/var/exp2/751377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3284d6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp2_751377() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = exp2(arg_0);
+}
+
+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@0x0000028B810B9560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028B810B9560(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.glsl
new file mode 100644
index 0000000..93e0de7
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_751377() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = exp2(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = exp2(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = exp2(arg_0);
+}
+
+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/var/exp2/751377.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.msl
new file mode 100644
index 0000000..ee675e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_751377() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = exp2(arg_0);
+}
+
+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/var/exp2/751377.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6a7c0c
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %exp2_751377 "exp2_751377"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_751377 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Exp2 %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %exp2_751377
+               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 %exp2_751377
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %exp2_751377
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.wgsl
new file mode 100644
index 0000000..54d18f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp2_751377() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = exp2(arg_0);
+}
+
+@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/var/exp2/b408e4.wgsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl
new file mode 100644
index 0000000..25f4d91
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = exp2(arg_0);
+}
+
+@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/var/exp2/b408e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1da83c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp2_b408e4() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = exp2(arg_0);
+}
+
+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/var/exp2/b408e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dad6555
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp2_b408e4() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = exp2(arg_0);
+}
+
+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@0x000001CEFA5170D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CEFA5170D0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.glsl
new file mode 100644
index 0000000..978b7df
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_b408e4() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = exp2(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = exp2(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = exp2(arg_0);
+}
+
+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/var/exp2/b408e4.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.msl
new file mode 100644
index 0000000..3e0cbb2
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_b408e4() {
+  half arg_0 = 0.0h;
+  half res = exp2(arg_0);
+}
+
+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/var/exp2/b408e4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.spvasm
new file mode 100644
index 0000000..c387afb
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_b408e4 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Exp2 %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %exp2_b408e4
+               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 %exp2_b408e4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %exp2_b408e4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.wgsl
new file mode 100644
index 0000000..0772e03
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp2_b408e4() {
+  var arg_0 = f16();
+  var res : f16 = exp2(arg_0);
+}
+
+@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/var/exp2/ffa827.wgsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl
new file mode 100644
index 0000000..f9fc7cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = exp2(arg_0);
+}
+
+@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/var/exp2/ffa827.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..199b7a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void exp2_ffa827() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = exp2(arg_0);
+}
+
+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/var/exp2/ffa827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..87e544c
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void exp2_ffa827() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = exp2(arg_0);
+}
+
+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@0x000001E8001E07F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E8001E07F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.glsl
new file mode 100644
index 0000000..eacdcb0
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_ffa827() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = exp2(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = exp2(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = exp2(arg_0);
+}
+
+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/var/exp2/ffa827.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.msl
new file mode 100644
index 0000000..0dc6782
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_ffa827() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = exp2(arg_0);
+}
+
+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/var/exp2/ffa827.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.spvasm
new file mode 100644
index 0000000..d343ed6
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %exp2_ffa827 "exp2_ffa827"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_ffa827 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Exp2 %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %exp2_ffa827
+               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 %exp2_ffa827
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %exp2_ffa827
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.wgsl
new file mode 100644
index 0000000..cc00537
--- /dev/null
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn exp2_ffa827() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = exp2(arg_0);
+}
+
+@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/var/faceForward/524986.wgsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl
new file mode 100644
index 0000000..1dafe7b
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res: vec3<f16> = faceForward(arg_0, arg_1, arg_2);
+}
+
+@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/var/faceForward/524986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ebf2086
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void faceForward_524986() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/524986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13e64eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void faceForward_524986() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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@0x00000295C6562990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.glsl
new file mode 100644
index 0000000..a53d710
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_524986() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/524986.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.msl
new file mode 100644
index 0000000..71beddb
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void faceForward_524986() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 arg_2 = half3(0.0h);
+  half3 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/524986.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.spvasm
new file mode 100644
index 0000000..7c84d75
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%faceForward_524986 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v3half %arg_0
+         %23 = OpLoad %v3half %arg_1
+         %24 = OpLoad %v3half %arg_2
+         %20 = OpExtInst %v3half %21 FaceForward %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %faceForward_524986
+               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 %faceForward_524986
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %faceForward_524986
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.wgsl
new file mode 100644
index 0000000..99a0ce8
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn faceForward_524986() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res : vec3<f16> = faceForward(arg_0, arg_1, arg_2);
+}
+
+@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/var/faceForward/cc63dc.wgsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl
new file mode 100644
index 0000000..4c15845
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res: vec4<f16> = faceForward(arg_0, arg_1, arg_2);
+}
+
+@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/var/faceForward/cc63dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9137554
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void faceForward_cc63dc() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a1942e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void faceForward_cc63dc() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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@0x000002186E2D0B70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.glsl
new file mode 100644
index 0000000..37cf24f
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_cc63dc() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/cc63dc.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.msl
new file mode 100644
index 0000000..aa5ce15
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void faceForward_cc63dc() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 arg_2 = half4(0.0h);
+  half4 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/cc63dc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.spvasm
new file mode 100644
index 0000000..eccdf43
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%faceForward_cc63dc = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v4half %arg_0
+         %23 = OpLoad %v4half %arg_1
+         %24 = OpLoad %v4half %arg_2
+         %20 = OpExtInst %v4half %21 FaceForward %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %faceForward_cc63dc
+               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 %faceForward_cc63dc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %faceForward_cc63dc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.wgsl
new file mode 100644
index 0000000..48f247d
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn faceForward_cc63dc() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res : vec4<f16> = faceForward(arg_0, arg_1, arg_2);
+}
+
+@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/var/faceForward/fb0f2e.wgsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl
new file mode 100644
index 0000000..51da087
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res: vec2<f16> = faceForward(arg_0, arg_1, arg_2);
+}
+
+@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/var/faceForward/fb0f2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e0972c
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void faceForward_fb0f2e() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68f1d02
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void faceForward_fb0f2e() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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@0x000002526D7A2430(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.glsl
new file mode 100644
index 0000000..9dfcea0
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_fb0f2e() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/fb0f2e.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.msl
new file mode 100644
index 0000000..9a425c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void faceForward_fb0f2e() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 arg_2 = half2(0.0h);
+  half2 res = faceforward(arg_0, arg_1, arg_2);
+}
+
+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/var/faceForward/fb0f2e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.spvasm
new file mode 100644
index 0000000..a5f1f81
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%faceForward_fb0f2e = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v2half %arg_0
+         %23 = OpLoad %v2half %arg_1
+         %24 = OpLoad %v2half %arg_2
+         %20 = OpExtInst %v2half %21 FaceForward %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %faceForward_fb0f2e
+               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 %faceForward_fb0f2e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %faceForward_fb0f2e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.wgsl
new file mode 100644
index 0000000..985cbab
--- /dev/null
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn faceForward_fb0f2e() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res : vec2<f16> = faceForward(arg_0, arg_1, arg_2);
+}
+
+@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/var/floor/3802c0.wgsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl
new file mode 100644
index 0000000..22ede14
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = floor(arg_0);
+}
+
+@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/var/floor/3802c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a997d82
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void floor_3802c0() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = floor(arg_0);
+}
+
+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/var/floor/3802c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e347826
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void floor_3802c0() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = floor(arg_0);
+}
+
+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@0x000002CFD3102AA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CFD3102AA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.glsl
new file mode 100644
index 0000000..2f0dabf
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_3802c0() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = floor(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = floor(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = floor(arg_0);
+}
+
+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/var/floor/3802c0.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.msl
new file mode 100644
index 0000000..48f2187
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_3802c0() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = floor(arg_0);
+}
+
+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/var/floor/3802c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.spvasm
new file mode 100644
index 0000000..8c34a52
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %floor_3802c0 "floor_3802c0"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_3802c0 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Floor %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %floor_3802c0
+               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 %floor_3802c0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %floor_3802c0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.wgsl
new file mode 100644
index 0000000..e668dbc
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn floor_3802c0() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = floor(arg_0);
+}
+
+@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/var/floor/84658c.wgsl b/test/tint/builtins/gen/var/floor/84658c.wgsl
new file mode 100644
index 0000000..9cf6d75
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = floor(arg_0);
+}
+
+@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/var/floor/84658c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d10e8f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void floor_84658c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = floor(arg_0);
+}
+
+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/var/floor/84658c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04bf97a
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void floor_84658c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = floor(arg_0);
+}
+
+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@0x00000208743D86D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000208743D86D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.glsl
new file mode 100644
index 0000000..6c2236f
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_84658c() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = floor(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = floor(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = floor(arg_0);
+}
+
+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/var/floor/84658c.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.msl
new file mode 100644
index 0000000..dbc91a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_84658c() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = floor(arg_0);
+}
+
+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/var/floor/84658c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.spvasm
new file mode 100644
index 0000000..5ab1072
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %floor_84658c "floor_84658c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_84658c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Floor %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %floor_84658c
+               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 %floor_84658c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %floor_84658c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.wgsl
new file mode 100644
index 0000000..af40f90
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn floor_84658c() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = floor(arg_0);
+}
+
+@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/var/floor/a2d31b.wgsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl
new file mode 100644
index 0000000..edc990a
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = floor(arg_0);
+}
+
+@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/var/floor/a2d31b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3eccce6
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void floor_a2d31b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = floor(arg_0);
+}
+
+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/var/floor/a2d31b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b670bde
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void floor_a2d31b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = floor(arg_0);
+}
+
+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@0x0000020277229EB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020277229EB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.glsl
new file mode 100644
index 0000000..4e2d116
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_a2d31b() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = floor(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = floor(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = floor(arg_0);
+}
+
+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/var/floor/a2d31b.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.msl
new file mode 100644
index 0000000..521eda3
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_a2d31b() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = floor(arg_0);
+}
+
+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/var/floor/a2d31b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.spvasm
new file mode 100644
index 0000000..4cf75b1
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %floor_a2d31b "floor_a2d31b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_a2d31b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Floor %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %floor_a2d31b
+               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 %floor_a2d31b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %floor_a2d31b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.wgsl
new file mode 100644
index 0000000..7b23f7d
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn floor_a2d31b() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = floor(arg_0);
+}
+
+@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/var/floor/b6e09c.wgsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl
new file mode 100644
index 0000000..7ddbc74
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = floor(arg_0);
+}
+
+@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/var/floor/b6e09c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a13fef1
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void floor_b6e09c() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = floor(arg_0);
+}
+
+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/var/floor/b6e09c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04d8270
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void floor_b6e09c() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = floor(arg_0);
+}
+
+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@0x000001FC8E37C9F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FC8E37C9F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.glsl
new file mode 100644
index 0000000..5a9eded
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_b6e09c() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = floor(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = floor(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = floor(arg_0);
+}
+
+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/var/floor/b6e09c.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.msl
new file mode 100644
index 0000000..eddf8f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_b6e09c() {
+  half arg_0 = 0.0h;
+  half res = floor(arg_0);
+}
+
+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/var/floor/b6e09c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.spvasm
new file mode 100644
index 0000000..45cc608
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_b6e09c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Floor %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %floor_b6e09c
+               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 %floor_b6e09c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %floor_b6e09c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.wgsl
new file mode 100644
index 0000000..68db5d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn floor_b6e09c() {
+  var arg_0 = f16();
+  var res : f16 = floor(arg_0);
+}
+
+@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/var/fma/ab7818.wgsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl
new file mode 100644
index 0000000..ab0ffd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res: vec4<f16> = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fma/ab7818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ba7fd24
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void fma_ab7818() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = mad(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/ab7818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4cc79d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void fma_ab7818() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = mad(arg_0, arg_1, arg_2);
+}
+
+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@0x000001C8EC063920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.glsl
new file mode 100644
index 0000000..210f2f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_ab7818() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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/var/fma/ab7818.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.msl
new file mode 100644
index 0000000..7618e6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_ab7818() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 arg_2 = half4(0.0h);
+  half4 res = fma(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/ab7818.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.spvasm
new file mode 100644
index 0000000..cfe30fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_ab7818 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v4half %arg_0
+         %23 = OpLoad %v4half %arg_1
+         %24 = OpLoad %v4half %arg_2
+         %20 = OpExtInst %v4half %21 Fma %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %fma_ab7818
+               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 %fma_ab7818
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %fma_ab7818
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.wgsl
new file mode 100644
index 0000000..14808ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn fma_ab7818() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res : vec4<f16> = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fma/bf21b6.wgsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl
new file mode 100644
index 0000000..7fa2711
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res: vec2<f16> = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fma/bf21b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fad0508
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void fma_bf21b6() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = mad(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/bf21b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c30ed3a
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void fma_bf21b6() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = mad(arg_0, arg_1, arg_2);
+}
+
+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@0x00000213565C3920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.glsl
new file mode 100644
index 0000000..d6376ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_bf21b6() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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/var/fma/bf21b6.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.msl
new file mode 100644
index 0000000..fd5f39c
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_bf21b6() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 arg_2 = half2(0.0h);
+  half2 res = fma(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/bf21b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..d66229d
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_bf21b6 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v2half %arg_0
+         %23 = OpLoad %v2half %arg_1
+         %24 = OpLoad %v2half %arg_2
+         %20 = OpExtInst %v2half %21 Fma %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %fma_bf21b6
+               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 %fma_bf21b6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %fma_bf21b6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..aef061d
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn fma_bf21b6() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res : vec2<f16> = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fma/c8abb3.wgsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl
new file mode 100644
index 0000000..c86a699
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res: f16 = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fma/c8abb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ce25e33
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void fma_c8abb3() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = mad(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/c8abb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0085a06
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void fma_c8abb3() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = mad(arg_0, arg_1, arg_2);
+}
+
+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@0x000001545EC319C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001545EC319C0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.glsl
new file mode 100644
index 0000000..971fb93
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_c8abb3() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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/var/fma/c8abb3.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.msl
new file mode 100644
index 0000000..8cef0c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_c8abb3() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half arg_2 = 0.0h;
+  half res = fma(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/c8abb3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.spvasm
new file mode 100644
index 0000000..b033681
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %fma_c8abb3 "fma_c8abb3"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_c8abb3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+      %arg_2 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+               OpStore %arg_2 %14
+         %21 = OpLoad %half %arg_0
+         %22 = OpLoad %half %arg_1
+         %23 = OpLoad %half %arg_2
+         %19 = OpExtInst %half %20 Fma %21 %22 %23
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %fma_c8abb3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %fma_c8abb3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %fma_c8abb3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.wgsl
new file mode 100644
index 0000000..6f24f34
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn fma_c8abb3() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res : f16 = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fma/e7abdc.wgsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl
new file mode 100644
index 0000000..a07279d
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res: vec3<f16> = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fma/e7abdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b6b357e
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void fma_e7abdc() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = mad(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/e7abdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0866b5c
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void fma_e7abdc() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = mad(arg_0, arg_1, arg_2);
+}
+
+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@0x000001D742133930(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.glsl
new file mode 100644
index 0000000..ba47f42
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_e7abdc() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = ((arg_0) * (arg_1) + (arg_2));
+}
+
+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/var/fma/e7abdc.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.msl
new file mode 100644
index 0000000..c7e165a
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_e7abdc() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 arg_2 = half3(0.0h);
+  half3 res = fma(arg_0, arg_1, arg_2);
+}
+
+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/var/fma/e7abdc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.spvasm
new file mode 100644
index 0000000..c9aaaf7
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_e7abdc = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v3half %arg_0
+         %23 = OpLoad %v3half %arg_1
+         %24 = OpLoad %v3half %arg_2
+         %20 = OpExtInst %v3half %21 Fma %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %fma_e7abdc
+               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 %fma_e7abdc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %fma_e7abdc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.wgsl
new file mode 100644
index 0000000..2dbbcac
--- /dev/null
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn fma_e7abdc() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res : vec3<f16> = fma(arg_0, arg_1, arg_2);
+}
+
+@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/var/fract/181aa9.wgsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl
new file mode 100644
index 0000000..12cc4bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = fract(arg_0);
+}
+
+@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/var/fract/181aa9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..08a307d
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void fract_181aa9() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = frac(arg_0);
+}
+
+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/var/fract/181aa9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..87fc1a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void fract_181aa9() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = frac(arg_0);
+}
+
+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@0x00000290A4231990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000290A4231990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.glsl
new file mode 100644
index 0000000..e9871d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_181aa9() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = fract(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = fract(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = fract(arg_0);
+}
+
+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/var/fract/181aa9.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.msl
new file mode 100644
index 0000000..f3351da
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_181aa9() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = fract(arg_0);
+}
+
+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/var/fract/181aa9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.spvasm
new file mode 100644
index 0000000..47d1ee6
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %fract_181aa9 "fract_181aa9"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_181aa9 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Fract %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %fract_181aa9
+               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 %fract_181aa9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %fract_181aa9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.wgsl
new file mode 100644
index 0000000..6e73c70
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn fract_181aa9() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = fract(arg_0);
+}
+
+@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/var/fract/498c77.wgsl b/test/tint/builtins/gen/var/fract/498c77.wgsl
new file mode 100644
index 0000000..aef30b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = fract(arg_0);
+}
+
+@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/var/fract/498c77.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d9e34ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void fract_498c77() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = frac(arg_0);
+}
+
+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/var/fract/498c77.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bf6c7ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void fract_498c77() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = frac(arg_0);
+}
+
+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@0x000001F8576786D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8576786D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.glsl
new file mode 100644
index 0000000..c9daa26
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_498c77() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = fract(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = fract(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = fract(arg_0);
+}
+
+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/var/fract/498c77.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.msl
new file mode 100644
index 0000000..3f7a3f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_498c77() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = fract(arg_0);
+}
+
+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/var/fract/498c77.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.spvasm
new file mode 100644
index 0000000..62ab9e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %fract_498c77 "fract_498c77"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_498c77 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Fract %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %fract_498c77
+               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 %fract_498c77
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %fract_498c77
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.wgsl
new file mode 100644
index 0000000..325c892
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn fract_498c77() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = fract(arg_0);
+}
+
+@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/var/fract/958a1d.wgsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl
new file mode 100644
index 0000000..187f494
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = fract(arg_0);
+}
+
+@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/var/fract/958a1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..98322b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void fract_958a1d() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = frac(arg_0);
+}
+
+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/var/fract/958a1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6771ca7
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void fract_958a1d() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = frac(arg_0);
+}
+
+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@0x000002450F006F40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002450F006F40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.glsl
new file mode 100644
index 0000000..283602b
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_958a1d() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = fract(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = fract(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = fract(arg_0);
+}
+
+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/var/fract/958a1d.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.msl
new file mode 100644
index 0000000..745157e
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_958a1d() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = fract(arg_0);
+}
+
+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/var/fract/958a1d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.spvasm
new file mode 100644
index 0000000..9393329
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %fract_958a1d "fract_958a1d"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_958a1d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Fract %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %fract_958a1d
+               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 %fract_958a1d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %fract_958a1d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.wgsl
new file mode 100644
index 0000000..d35d4d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn fract_958a1d() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = fract(arg_0);
+}
+
+@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/var/fract/eb38ce.wgsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl
new file mode 100644
index 0000000..435df2c
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = fract(arg_0);
+}
+
+@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/var/fract/eb38ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9aa5d74
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void fract_eb38ce() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = frac(arg_0);
+}
+
+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/var/fract/eb38ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c481b82
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void fract_eb38ce() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = frac(arg_0);
+}
+
+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@0x0000024B27352E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B27352E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.glsl
new file mode 100644
index 0000000..bb43918
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_eb38ce() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = fract(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = fract(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = fract(arg_0);
+}
+
+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/var/fract/eb38ce.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.msl
new file mode 100644
index 0000000..6ca36be
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_eb38ce() {
+  half arg_0 = 0.0h;
+  half res = fract(arg_0);
+}
+
+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/var/fract/eb38ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..1d320c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_eb38ce = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Fract %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %fract_eb38ce
+               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 %fract_eb38ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %fract_eb38ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..a590dae
--- /dev/null
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn fract_eb38ce() {
+  var arg_0 = f16();
+  var res : f16 = fract(arg_0);
+}
+
+@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/var/frexp/3dd21e.wgsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl
new file mode 100644
index 0000000..6b40118
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res = frexp(arg_0);
+}
+
+@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/var/frexp/3dd21e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..557bac1
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,42 @@
+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() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  frexp_result_vec4_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/3dd21e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c514368
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,47 @@
+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() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  frexp_result_vec4_f16 res = tint_frexp(arg_0);
+}
+
+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@0x000002B0820A2F50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.glsl
new file mode 100644
index 0000000..a1dc166
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  frexp_result_vec4_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  frexp_result_vec4_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  frexp_result_vec4_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/3dd21e.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.msl
new file mode 100644
index 0000000..7ca5bd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half4 arg_0 = half4(0.0h);
+  frexp_result_vec4_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/3dd21e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.spvasm
new file mode 100644
index 0000000..70eddba
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %22 = 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 %arg_0 "arg_0"
+               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
+         %15 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%__frexp_result_vec4_f16 = OpTypeStruct %v4half %v4int
+%_ptr_Function___frexp_result_vec4_f16 = OpTypePointer Function %__frexp_result_vec4_f16
+         %26 = OpConstantNull %__frexp_result_vec4_f16
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_3dd21e = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function___frexp_result_vec4_f16 Function %26
+               OpStore %arg_0 %15
+         %23 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %__frexp_result_vec4_f16 %22 FrexpStruct %23
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %frexp_3dd21e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %frexp_3dd21e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %frexp_3dd21e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.wgsl
new file mode 100644
index 0000000..557f702
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn frexp_3dd21e() {
+  var arg_0 = vec4<f16>(f16());
+  var res = frexp(arg_0);
+}
+
+@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/var/frexp/5257dd.wgsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl
new file mode 100644
index 0000000..9451324
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res = frexp(arg_0);
+}
+
+@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/var/frexp/5257dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b52f6d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,42 @@
+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() {
+  float16_t arg_0 = float16_t(0.0h);
+  frexp_result_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/5257dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e4e360f
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,47 @@
+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() {
+  float16_t arg_0 = float16_t(0.0h);
+  frexp_result_f16 res = tint_frexp(arg_0);
+}
+
+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@0x0000029E12ED17D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.glsl
new file mode 100644
index 0000000..0d7e39f
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  float16_t arg_0 = 0.0hf;
+  frexp_result_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  float16_t arg_0 = 0.0hf;
+  frexp_result_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  float16_t arg_0 = 0.0hf;
+  frexp_result_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/5257dd.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.msl
new file mode 100644
index 0000000..9d0edc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half arg_0 = 0.0h;
+  frexp_result_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/5257dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.spvasm
new file mode 100644
index 0000000..b0008a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %frexp_5257dd "frexp_5257dd"
+               OpName %arg_0 "arg_0"
+               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
+         %14 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+        %int = OpTypeInt 32 1
+%__frexp_result_f16 = OpTypeStruct %half %int
+%_ptr_Function___frexp_result_f16 = OpTypePointer Function %__frexp_result_f16
+         %24 = OpConstantNull %__frexp_result_f16
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_5257dd = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function___frexp_result_f16 Function %24
+               OpStore %arg_0 %14
+         %21 = OpLoad %half %arg_0
+         %17 = OpExtInst %__frexp_result_f16 %20 FrexpStruct %21
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %frexp_5257dd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %frexp_5257dd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %frexp_5257dd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.wgsl
new file mode 100644
index 0000000..664e19a
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn frexp_5257dd() {
+  var arg_0 = f16();
+  var res = frexp(arg_0);
+}
+
+@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/var/frexp/5f47bf.wgsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl
new file mode 100644
index 0000000..8d43e80
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res = frexp(arg_0);
+}
+
+@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/var/frexp/5f47bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..478ced8
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,42 @@
+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() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  frexp_result_vec2_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/5f47bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..82d183a
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,47 @@
+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() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  frexp_result_vec2_f16 res = tint_frexp(arg_0);
+}
+
+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@0x000002974137DC80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.glsl
new file mode 100644
index 0000000..2864a81
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  frexp_result_vec2_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  frexp_result_vec2_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  frexp_result_vec2_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/5f47bf.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.msl
new file mode 100644
index 0000000..dfdef71
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half2 arg_0 = half2(0.0h);
+  frexp_result_vec2_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/5f47bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.spvasm
new file mode 100644
index 0000000..c9c4190
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %22 = 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 %arg_0 "arg_0"
+               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
+         %15 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%__frexp_result_vec2_f16 = OpTypeStruct %v2half %v2int
+%_ptr_Function___frexp_result_vec2_f16 = OpTypePointer Function %__frexp_result_vec2_f16
+         %26 = OpConstantNull %__frexp_result_vec2_f16
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_5f47bf = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function___frexp_result_vec2_f16 Function %26
+               OpStore %arg_0 %15
+         %23 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %__frexp_result_vec2_f16 %22 FrexpStruct %23
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %frexp_5f47bf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %frexp_5f47bf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %frexp_5f47bf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.wgsl
new file mode 100644
index 0000000..63fce21
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn frexp_5f47bf() {
+  var arg_0 = vec2<f16>(f16());
+  var res = frexp(arg_0);
+}
+
+@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/var/frexp/ae4a66.wgsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl
new file mode 100644
index 0000000..e5aad68
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res = frexp(arg_0);
+}
+
+@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/var/frexp/ae4a66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..633a556
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.dxc.hlsl
@@ -0,0 +1,42 @@
+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() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  frexp_result_vec3_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/ae4a66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..31c17af
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
@@ -0,0 +1,47 @@
+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() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  frexp_result_vec3_f16 res = tint_frexp(arg_0);
+}
+
+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@0x0000024B22CBDA70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.glsl
new file mode 100644
index 0000000..36a4628
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  frexp_result_vec3_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  frexp_result_vec3_f16 res = tint_frexp(arg_0);
+}
+
+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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  frexp_result_vec3_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/ae4a66.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.msl
new file mode 100644
index 0000000..670a534
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half3 arg_0 = half3(0.0h);
+  frexp_result_vec3_f16 res = tint_frexp(arg_0);
+}
+
+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/var/frexp/ae4a66.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.spvasm
new file mode 100644
index 0000000..e71e352
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %22 = 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 %arg_0 "arg_0"
+               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
+         %15 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%__frexp_result_vec3_f16 = OpTypeStruct %v3half %v3int
+%_ptr_Function___frexp_result_vec3_f16 = OpTypePointer Function %__frexp_result_vec3_f16
+         %26 = OpConstantNull %__frexp_result_vec3_f16
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_ae4a66 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function___frexp_result_vec3_f16 Function %26
+               OpStore %arg_0 %15
+         %23 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %__frexp_result_vec3_f16 %22 FrexpStruct %23
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %frexp_ae4a66
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %frexp_ae4a66
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %frexp_ae4a66
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.wgsl
new file mode 100644
index 0000000..cdbd561
--- /dev/null
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn frexp_ae4a66() {
+  var arg_0 = vec3<f16>(f16());
+  var res = frexp(arg_0);
+}
+
+@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/var/inverseSqrt/440300.wgsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl
new file mode 100644
index 0000000..2464195
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = inverseSqrt(arg_0);
+}
+
+@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/var/inverseSqrt/440300.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fe2cbec
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void inverseSqrt_440300() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68da594
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void inverseSqrt_440300() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = rsqrt(arg_0);
+}
+
+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@0x0000020CC4502790(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020CC4502790(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.glsl
new file mode 100644
index 0000000..d673b30
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_440300() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = inversesqrt(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = inversesqrt(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = inversesqrt(arg_0);
+}
+
+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/var/inverseSqrt/440300.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.msl
new file mode 100644
index 0000000..f8cd853
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_440300() {
+  half arg_0 = 0.0h;
+  half res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/440300.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.spvasm
new file mode 100644
index 0000000..d53e1d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_440300 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 InverseSqrt %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %inverseSqrt_440300
+               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 %inverseSqrt_440300
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %inverseSqrt_440300
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.wgsl
new file mode 100644
index 0000000..f0c832a
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn inverseSqrt_440300() {
+  var arg_0 = f16();
+  var res : f16 = inverseSqrt(arg_0);
+}
+
+@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/var/inverseSqrt/5f51f8.wgsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl
new file mode 100644
index 0000000..e7e70aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = inverseSqrt(arg_0);
+}
+
+@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/var/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5ed334a
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void inverseSqrt_5f51f8() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13b4979
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void inverseSqrt_5f51f8() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = rsqrt(arg_0);
+}
+
+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@0x000002676056B340(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002676056B340(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.glsl
new file mode 100644
index 0000000..4117f6a
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_5f51f8() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = inversesqrt(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = inversesqrt(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = inversesqrt(arg_0);
+}
+
+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/var/inverseSqrt/5f51f8.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.msl
new file mode 100644
index 0000000..58cd628
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_5f51f8() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/5f51f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..3d42889
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %inverseSqrt_5f51f8 "inverseSqrt_5f51f8"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_5f51f8 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 InverseSqrt %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %inverseSqrt_5f51f8
+               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 %inverseSqrt_5f51f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %inverseSqrt_5f51f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..edabbfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn inverseSqrt_5f51f8() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = inverseSqrt(arg_0);
+}
+
+@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/var/inverseSqrt/b85ebd.wgsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl
new file mode 100644
index 0000000..4a9369f
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = inverseSqrt(arg_0);
+}
+
+@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/var/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fdeb4e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void inverseSqrt_b85ebd() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4fd1981
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void inverseSqrt_b85ebd() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = rsqrt(arg_0);
+}
+
+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@0x00000214452BD540(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000214452BD540(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.glsl
new file mode 100644
index 0000000..bf39272
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_b85ebd() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = inversesqrt(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = inversesqrt(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = inversesqrt(arg_0);
+}
+
+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/var/inverseSqrt/b85ebd.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.msl
new file mode 100644
index 0000000..a7f7be1
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_b85ebd() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/b85ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.spvasm
new file mode 100644
index 0000000..a43efc8
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %inverseSqrt_b85ebd "inverseSqrt_b85ebd"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_b85ebd = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 InverseSqrt %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %inverseSqrt_b85ebd
+               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 %inverseSqrt_b85ebd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %inverseSqrt_b85ebd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.wgsl
new file mode 100644
index 0000000..b53c8ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn inverseSqrt_b85ebd() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = inverseSqrt(arg_0);
+}
+
+@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/var/inverseSqrt/cbdc70.wgsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl
new file mode 100644
index 0000000..fdb5f64
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = inverseSqrt(arg_0);
+}
+
+@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/var/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae31e2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void inverseSqrt_cbdc70() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5079fc1
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void inverseSqrt_cbdc70() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = rsqrt(arg_0);
+}
+
+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@0x0000024C10401C30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C10401C30(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.glsl
new file mode 100644
index 0000000..5d41267
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_cbdc70() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = inversesqrt(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = inversesqrt(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = inversesqrt(arg_0);
+}
+
+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/var/inverseSqrt/cbdc70.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.msl
new file mode 100644
index 0000000..0dc51ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_cbdc70() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = rsqrt(arg_0);
+}
+
+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/var/inverseSqrt/cbdc70.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.spvasm
new file mode 100644
index 0000000..e476973
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %inverseSqrt_cbdc70 "inverseSqrt_cbdc70"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_cbdc70 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 InverseSqrt %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %inverseSqrt_cbdc70
+               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 %inverseSqrt_cbdc70
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %inverseSqrt_cbdc70
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4e10cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn inverseSqrt_cbdc70() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = inverseSqrt(arg_0);
+}
+
+@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/var/ldexp/3d90b4.wgsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl
new file mode 100644
index 0000000..152969f
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<i32>(1);
+  var res: vec2<f16> = ldexp(arg_0, arg_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/var/ldexp/3d90b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..876fcb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void ldexp_3d90b4() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  int2 arg_1 = (1).xx;
+  vector<float16_t, 2> res = ldexp(arg_0, arg_1);
+}
+
+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/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e19db38
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void ldexp_3d90b4() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  int2 arg_1 = (1).xx;
+  vector<float16_t, 2> res = ldexp(arg_0, arg_1);
+}
+
+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@0x00000297E2767C20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000297E2767C20(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.glsl
new file mode 100644
index 0000000..13d5b89
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_3d90b4() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  ivec2 arg_1 = ivec2(1);
+  f16vec2 res = ldexp(arg_0, arg_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 arg_0 = f16vec2(0.0hf);
+  ivec2 arg_1 = ivec2(1);
+  f16vec2 res = ldexp(arg_0, arg_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 arg_0 = f16vec2(0.0hf);
+  ivec2 arg_1 = ivec2(1);
+  f16vec2 res = ldexp(arg_0, arg_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/var/ldexp/3d90b4.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.msl
new file mode 100644
index 0000000..317c875
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_3d90b4() {
+  half2 arg_0 = half2(0.0h);
+  int2 arg_1 = int2(1);
+  half2 res = ldexp(arg_0, arg_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/var/ldexp/3d90b4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.spvasm
new file mode 100644
index 0000000..61326bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %26 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %21 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_3d90b4 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %24
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %21
+         %27 = OpLoad %v2half %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %25 = OpExtInst %v2half %26 Ldexp %27 %28
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %ldexp_3d90b4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %ldexp_3d90b4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %ldexp_3d90b4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.wgsl
new file mode 100644
index 0000000..c4773b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn ldexp_3d90b4() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<i32>(1);
+  var res : vec2<f16> = ldexp(arg_0, arg_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/var/ldexp/624e0c.wgsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl
new file mode 100644
index 0000000..2bf526d
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = f16();
+  var arg_1 = 1;
+  var res: f16 = ldexp(arg_0, arg_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/var/ldexp/624e0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6c7e796
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void ldexp_624e0c() {
+  float16_t arg_0 = float16_t(0.0h);
+  int arg_1 = 1;
+  float16_t res = ldexp(arg_0, arg_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/var/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..77d2859
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void ldexp_624e0c() {
+  float16_t arg_0 = float16_t(0.0h);
+  int arg_1 = 1;
+  float16_t res = ldexp(arg_0, arg_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@0x000001C8D38A1580(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8D38A1580(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.glsl
new file mode 100644
index 0000000..f978069
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_624e0c() {
+  float16_t arg_0 = 0.0hf;
+  int arg_1 = 1;
+  float16_t res = ldexp(arg_0, arg_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 arg_0 = 0.0hf;
+  int arg_1 = 1;
+  float16_t res = ldexp(arg_0, arg_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 arg_0 = 0.0hf;
+  int arg_1 = 1;
+  float16_t res = ldexp(arg_0, arg_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/var/ldexp/624e0c.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.msl
new file mode 100644
index 0000000..f0bc88f
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_624e0c() {
+  half arg_0 = 0.0h;
+  int arg_1 = 1;
+  half res = ldexp(arg_0, arg_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/var/ldexp/624e0c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.spvasm
new file mode 100644
index 0000000..7fead30
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %ldexp_624e0c "ldexp_624e0c"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %21 = OpConstantNull %int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_624e0c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_int Function %21
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %half %arg_0
+         %25 = OpLoad %int %arg_1
+         %22 = OpExtInst %half %23 Ldexp %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %ldexp_624e0c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %ldexp_624e0c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %ldexp_624e0c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.wgsl
new file mode 100644
index 0000000..393f1ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn ldexp_624e0c() {
+  var arg_0 = f16();
+  var arg_1 = 1;
+  var res : f16 = ldexp(arg_0, arg_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/var/ldexp/7485ce.wgsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl
new file mode 100644
index 0000000..8904fef
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<i32>(1);
+  var res: vec3<f16> = ldexp(arg_0, arg_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/var/ldexp/7485ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ca8bf2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void ldexp_7485ce() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  int3 arg_1 = (1).xxx;
+  vector<float16_t, 3> res = ldexp(arg_0, arg_1);
+}
+
+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/var/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fa06333
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void ldexp_7485ce() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  int3 arg_1 = (1).xxx;
+  vector<float16_t, 3> res = ldexp(arg_0, arg_1);
+}
+
+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@0x000001553C486F80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001553C486F80(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.glsl
new file mode 100644
index 0000000..39204f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_7485ce() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  ivec3 arg_1 = ivec3(1);
+  f16vec3 res = ldexp(arg_0, arg_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 arg_0 = f16vec3(0.0hf);
+  ivec3 arg_1 = ivec3(1);
+  f16vec3 res = ldexp(arg_0, arg_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 arg_0 = f16vec3(0.0hf);
+  ivec3 arg_1 = ivec3(1);
+  f16vec3 res = ldexp(arg_0, arg_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/var/ldexp/7485ce.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.msl
new file mode 100644
index 0000000..3475cb2
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_7485ce() {
+  half3 arg_0 = half3(0.0h);
+  int3 arg_1 = int3(1);
+  half3 res = ldexp(arg_0, arg_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/var/ldexp/7485ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..046509c
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %26 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %24 = OpConstantNull %v3int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_7485ce = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %24
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %21
+         %27 = OpLoad %v3half %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %25 = OpExtInst %v3half %26 Ldexp %27 %28
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %ldexp_7485ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %ldexp_7485ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %ldexp_7485ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..004f279
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn ldexp_7485ce() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<i32>(1);
+  var res : vec3<f16> = ldexp(arg_0, arg_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/var/ldexp/7fa13c.wgsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl
new file mode 100644
index 0000000..b5b562f
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<i32>(1);
+  var res: vec4<f16> = ldexp(arg_0, arg_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/var/ldexp/7fa13c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cd28414
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void ldexp_7fa13c() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  int4 arg_1 = (1).xxxx;
+  vector<float16_t, 4> res = ldexp(arg_0, arg_1);
+}
+
+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/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07506fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void ldexp_7fa13c() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  int4 arg_1 = (1).xxxx;
+  vector<float16_t, 4> res = ldexp(arg_0, arg_1);
+}
+
+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@0x0000020AEA25D620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020AEA25D620(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.glsl
new file mode 100644
index 0000000..d447a14
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_7fa13c() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  ivec4 arg_1 = ivec4(1);
+  f16vec4 res = ldexp(arg_0, arg_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 arg_0 = f16vec4(0.0hf);
+  ivec4 arg_1 = ivec4(1);
+  f16vec4 res = ldexp(arg_0, arg_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 arg_0 = f16vec4(0.0hf);
+  ivec4 arg_1 = ivec4(1);
+  f16vec4 res = ldexp(arg_0, arg_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/var/ldexp/7fa13c.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.msl
new file mode 100644
index 0000000..b4089fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_7fa13c() {
+  half4 arg_0 = half4(0.0h);
+  int4 arg_1 = int4(1);
+  half4 res = ldexp(arg_0, arg_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/var/ldexp/7fa13c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.spvasm
new file mode 100644
index 0000000..1b6c20a
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %26 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+        %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_v4int = OpTypePointer Function %v4int
+         %24 = OpConstantNull %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_7fa13c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4int Function %24
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %21
+         %27 = OpLoad %v4half %arg_0
+         %28 = OpLoad %v4int %arg_1
+         %25 = OpExtInst %v4half %26 Ldexp %27 %28
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %ldexp_7fa13c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %ldexp_7fa13c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %ldexp_7fa13c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.wgsl
new file mode 100644
index 0000000..350729e
--- /dev/null
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn ldexp_7fa13c() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<i32>(1);
+  var res : vec4<f16> = ldexp(arg_0, arg_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/var/length/3f0e13.wgsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl
new file mode 100644
index 0000000..6aa251c
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: f16 = length(arg_0);
+}
+
+@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/var/length/3f0e13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ef03b06
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void length_3f0e13() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  float16_t res = length(arg_0);
+}
+
+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/var/length/3f0e13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..01eb851
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void length_3f0e13() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  float16_t res = length(arg_0);
+}
+
+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@0x0000020BA93CCC20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(3,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(3,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.glsl
new file mode 100644
index 0000000..a5f2471
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_3f0e13() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+void fragment_main() {
+  length_3f0e13();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_3f0e13() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+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/var/length/3f0e13.wgsl.expected.msl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.msl
new file mode 100644
index 0000000..797b6fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_3f0e13() {
+  half2 arg_0 = half2(0.0h);
+  half res = length(arg_0);
+}
+
+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/var/length/3f0e13.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.spvasm
new file mode 100644
index 0000000..a92c3f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; 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 %length_3f0e13 "length_3f0e13"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %23 = OpConstantNull %half
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_3f0e13 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_half Function %23
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %half %19 Length %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %length_3f0e13
+               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 %length_3f0e13
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %length_3f0e13
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.wgsl
new file mode 100644
index 0000000..317830d
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn length_3f0e13() {
+  var arg_0 = vec2<f16>(f16());
+  var res : f16 = length(arg_0);
+}
+
+@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/var/length/5b1a9b.wgsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl
new file mode 100644
index 0000000..9c495a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: f16 = length(arg_0);
+}
+
+@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/var/length/5b1a9b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4865222
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void length_5b1a9b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  float16_t res = length(arg_0);
+}
+
+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/var/length/5b1a9b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4ea492e
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void length_5b1a9b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  float16_t res = length(arg_0);
+}
+
+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@0x000001EF153A9D90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(3,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(3,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.glsl
new file mode 100644
index 0000000..75b0701
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_5b1a9b() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+void fragment_main() {
+  length_5b1a9b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_5b1a9b() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+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/var/length/5b1a9b.wgsl.expected.msl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.msl
new file mode 100644
index 0000000..885dd66
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_5b1a9b() {
+  half4 arg_0 = half4(0.0h);
+  half res = length(arg_0);
+}
+
+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/var/length/5b1a9b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.spvasm
new file mode 100644
index 0000000..0d97afe
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; 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 %length_5b1a9b "length_5b1a9b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %23 = OpConstantNull %half
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_5b1a9b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_half Function %23
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %half %19 Length %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %length_5b1a9b
+               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 %length_5b1a9b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %length_5b1a9b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.wgsl
new file mode 100644
index 0000000..6e0095b
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn length_5b1a9b() {
+  var arg_0 = vec4<f16>(f16());
+  var res : f16 = length(arg_0);
+}
+
+@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/var/length/ba16d6.wgsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl
new file mode 100644
index 0000000..c45837e
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: f16 = length(arg_0);
+}
+
+@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/var/length/ba16d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7480de0
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void length_ba16d6() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  float16_t res = length(arg_0);
+}
+
+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/var/length/ba16d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1629874
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void length_ba16d6() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  float16_t res = length(arg_0);
+}
+
+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@0x000002644DC827C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(3,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(3,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.glsl
new file mode 100644
index 0000000..ea04f30
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_ba16d6() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+void fragment_main() {
+  length_ba16d6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_ba16d6() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  float16_t res = length(arg_0);
+}
+
+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/var/length/ba16d6.wgsl.expected.msl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.msl
new file mode 100644
index 0000000..54123fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_ba16d6() {
+  half3 arg_0 = half3(0.0h);
+  half res = length(arg_0);
+}
+
+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/var/length/ba16d6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.spvasm
new file mode 100644
index 0000000..4ec76a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; 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 %length_ba16d6 "length_ba16d6"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+%_ptr_Function_half = OpTypePointer Function %half
+         %23 = OpConstantNull %half
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_ba16d6 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_half Function %23
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %half %19 Length %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %length_ba16d6
+               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 %length_ba16d6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %length_ba16d6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.wgsl
new file mode 100644
index 0000000..9ad37a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn length_ba16d6() {
+  var arg_0 = vec3<f16>(f16());
+  var res : f16 = length(arg_0);
+}
+
+@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/var/length/c158da.wgsl b/test/tint/builtins/gen/var/length/c158da.wgsl
new file mode 100644
index 0000000..ce3f91f
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = length(arg_0);
+}
+
+@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/var/length/c158da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e8ad9f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void length_c158da() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = length(arg_0);
+}
+
+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/var/length/c158da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ff57d0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void length_c158da() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = length(arg_0);
+}
+
+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@0x00000229284770C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000229284770C0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.glsl
new file mode 100644
index 0000000..023690c
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_c158da() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = length(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = length(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = length(arg_0);
+}
+
+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/var/length/c158da.wgsl.expected.msl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.msl
new file mode 100644
index 0000000..ea75d99
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_c158da() {
+  half arg_0 = 0.0h;
+  half res = fabs(arg_0);
+}
+
+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/var/length/c158da.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.spvasm
new file mode 100644
index 0000000..5b14574
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_c158da = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Length %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %length_c158da
+               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_c158da
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %length_c158da
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.wgsl
new file mode 100644
index 0000000..c86993b
--- /dev/null
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn length_c158da() {
+  var arg_0 = f16();
+  var res : f16 = length(arg_0);
+}
+
+@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/var/log/6ff86f.wgsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl
new file mode 100644
index 0000000..c99e55d
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = log(arg_0);
+}
+
+@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/var/log/6ff86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..992df89
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log_6ff86f() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = log(arg_0);
+}
+
+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/var/log/6ff86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0ea573c
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log_6ff86f() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = log(arg_0);
+}
+
+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@0x0000029DD70F8770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029DD70F8770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.glsl
new file mode 100644
index 0000000..f4c8306
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_6ff86f() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = log(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = log(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = log(arg_0);
+}
+
+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/var/log/6ff86f.wgsl.expected.msl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.msl
new file mode 100644
index 0000000..941fcd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_6ff86f() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = log(arg_0);
+}
+
+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/var/log/6ff86f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc7f7de
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %log_6ff86f "log_6ff86f"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_6ff86f = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Log %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %log_6ff86f
+               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 %log_6ff86f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %log_6ff86f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.wgsl
new file mode 100644
index 0000000..0f1a204
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log_6ff86f() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = log(arg_0);
+}
+
+@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/var/log/8f0e32.wgsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl
new file mode 100644
index 0000000..02a6f23
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = log(arg_0);
+}
+
+@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/var/log/8f0e32.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f17ddd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log_8f0e32() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = log(arg_0);
+}
+
+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/var/log/8f0e32.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5c7cd72
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log_8f0e32() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = log(arg_0);
+}
+
+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@0x000002A51B8C05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A51B8C05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.glsl
new file mode 100644
index 0000000..5ed7deb
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_8f0e32() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = log(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = log(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = log(arg_0);
+}
+
+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/var/log/8f0e32.wgsl.expected.msl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.msl
new file mode 100644
index 0000000..975ed6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_8f0e32() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = log(arg_0);
+}
+
+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/var/log/8f0e32.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.spvasm
new file mode 100644
index 0000000..06d9a8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %log_8f0e32 "log_8f0e32"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_8f0e32 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Log %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %log_8f0e32
+               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 %log_8f0e32
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %log_8f0e32
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.wgsl
new file mode 100644
index 0000000..3e83d31
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log_8f0e32() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = log(arg_0);
+}
+
+@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/var/log/c9f489.wgsl b/test/tint/builtins/gen/var/log/c9f489.wgsl
new file mode 100644
index 0000000..cc94795
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = log(arg_0);
+}
+
+@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/var/log/c9f489.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f56a6b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log_c9f489() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = log(arg_0);
+}
+
+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/var/log/c9f489.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5929a1c
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log_c9f489() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = log(arg_0);
+}
+
+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@0x00000242D2E74480(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000242D2E74480(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.glsl
new file mode 100644
index 0000000..ab6cf71
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_c9f489() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = log(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = log(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = log(arg_0);
+}
+
+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/var/log/c9f489.wgsl.expected.msl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.msl
new file mode 100644
index 0000000..2f4c543
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_c9f489() {
+  half arg_0 = 0.0h;
+  half res = log(arg_0);
+}
+
+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/var/log/c9f489.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.spvasm
new file mode 100644
index 0000000..c2f50ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_c9f489 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Log %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %log_c9f489
+               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 %log_c9f489
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %log_c9f489
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4e30a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log_c9f489() {
+  var arg_0 = f16();
+  var res : f16 = log(arg_0);
+}
+
+@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/var/log/cdbdc1.wgsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl
new file mode 100644
index 0000000..18c4837
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = log(arg_0);
+}
+
+@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/var/log/cdbdc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4416f3e
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log_cdbdc1() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = log(arg_0);
+}
+
+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/var/log/cdbdc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..52bc9ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log_cdbdc1() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = log(arg_0);
+}
+
+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@0x000002F51ED070D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002F51ED070D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.glsl
new file mode 100644
index 0000000..8f49855
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_cdbdc1() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = log(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = log(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = log(arg_0);
+}
+
+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/var/log/cdbdc1.wgsl.expected.msl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.msl
new file mode 100644
index 0000000..e2e669e
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_cdbdc1() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = log(arg_0);
+}
+
+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/var/log/cdbdc1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.spvasm
new file mode 100644
index 0000000..aebc066
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %log_cdbdc1 "log_cdbdc1"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_cdbdc1 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Log %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %log_cdbdc1
+               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 %log_cdbdc1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %log_cdbdc1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ded928
--- /dev/null
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log_cdbdc1() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = log(arg_0);
+}
+
+@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/var/log2/38b478.wgsl b/test/tint/builtins/gen/var/log2/38b478.wgsl
new file mode 100644
index 0000000..9be1438
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = log2(arg_0);
+}
+
+@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/var/log2/38b478.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..78a5e05
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log2_38b478() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = log2(arg_0);
+}
+
+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/var/log2/38b478.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2bdd289
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log2_38b478() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = log2(arg_0);
+}
+
+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@0x0000021830188770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021830188770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.glsl
new file mode 100644
index 0000000..3b440c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_38b478() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = log2(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = log2(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = log2(arg_0);
+}
+
+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/var/log2/38b478.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.msl
new file mode 100644
index 0000000..86941bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_38b478() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = log2(arg_0);
+}
+
+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/var/log2/38b478.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.spvasm
new file mode 100644
index 0000000..f44bd99
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %log2_38b478 "log2_38b478"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_38b478 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Log2 %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %log2_38b478
+               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 %log2_38b478
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %log2_38b478
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.wgsl
new file mode 100644
index 0000000..5564f08
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log2_38b478() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = log2(arg_0);
+}
+
+@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/var/log2/776088.wgsl b/test/tint/builtins/gen/var/log2/776088.wgsl
new file mode 100644
index 0000000..cff82b7
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = log2(arg_0);
+}
+
+@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/var/log2/776088.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ddbb999
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log2_776088() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = log2(arg_0);
+}
+
+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/var/log2/776088.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..64e5e4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log2_776088() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = log2(arg_0);
+}
+
+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@0x000001FF2A6D2B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FF2A6D2B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.glsl
new file mode 100644
index 0000000..a4c5544
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_776088() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = log2(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = log2(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = log2(arg_0);
+}
+
+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/var/log2/776088.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.msl
new file mode 100644
index 0000000..856c87b
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_776088() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = log2(arg_0);
+}
+
+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/var/log2/776088.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.spvasm
new file mode 100644
index 0000000..0ed06cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %log2_776088 "log2_776088"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_776088 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Log2 %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %log2_776088
+               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 %log2_776088
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %log2_776088
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.wgsl
new file mode 100644
index 0000000..63b699d
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log2_776088() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = log2(arg_0);
+}
+
+@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/var/log2/8c10b3.wgsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl
new file mode 100644
index 0000000..7a838bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = log2(arg_0);
+}
+
+@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/var/log2/8c10b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..538dbfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log2_8c10b3() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = log2(arg_0);
+}
+
+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/var/log2/8c10b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d5a8f48
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log2_8c10b3() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = log2(arg_0);
+}
+
+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@0x000002320D6B2E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002320D6B2E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.glsl
new file mode 100644
index 0000000..dc3f0f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_8c10b3() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = log2(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = log2(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = log2(arg_0);
+}
+
+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/var/log2/8c10b3.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.msl
new file mode 100644
index 0000000..4f7aa2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_8c10b3() {
+  half arg_0 = 0.0h;
+  half res = log2(arg_0);
+}
+
+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/var/log2/8c10b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.spvasm
new file mode 100644
index 0000000..f280c63
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_8c10b3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Log2 %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %log2_8c10b3
+               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 %log2_8c10b3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %log2_8c10b3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.wgsl
new file mode 100644
index 0000000..8deaff1
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log2_8c10b3() {
+  var arg_0 = f16();
+  var res : f16 = log2(arg_0);
+}
+
+@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/var/log2/fb9f0b.wgsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl
new file mode 100644
index 0000000..48d01f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = log2(arg_0);
+}
+
+@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/var/log2/fb9f0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f99f7bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void log2_fb9f0b() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = log2(arg_0);
+}
+
+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/var/log2/fb9f0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c6e2e2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void log2_fb9f0b() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = log2(arg_0);
+}
+
+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@0x00000196C422E8F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000196C422E8F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.glsl
new file mode 100644
index 0000000..0676b9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_fb9f0b() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = log2(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = log2(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = log2(arg_0);
+}
+
+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/var/log2/fb9f0b.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.msl
new file mode 100644
index 0000000..dc1c78f
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_fb9f0b() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = log2(arg_0);
+}
+
+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/var/log2/fb9f0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.spvasm
new file mode 100644
index 0000000..35cba68
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %log2_fb9f0b "log2_fb9f0b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_fb9f0b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Log2 %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %log2_fb9f0b
+               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 %log2_fb9f0b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %log2_fb9f0b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.wgsl
new file mode 100644
index 0000000..fe9342f
--- /dev/null
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn log2_fb9f0b() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = log2(arg_0);
+}
+
+@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/var/max/111ac0.wgsl b/test/tint/builtins/gen/var/max/111ac0.wgsl
new file mode 100644
index 0000000..95fe46e
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var res: f16 = max(arg_0, arg_1);
+}
+
+@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/var/max/111ac0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..96099f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void max_111ac0() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = max(arg_0, arg_1);
+}
+
+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/var/max/111ac0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..15b4bff
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void max_111ac0() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = max(arg_0, arg_1);
+}
+
+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@0x00000261ECC86E70(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261ECC86E70(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.glsl
new file mode 100644
index 0000000..e765053
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_111ac0() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = max(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = max(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = max(arg_0, arg_1);
+}
+
+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/var/max/111ac0.wgsl.expected.msl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.msl
new file mode 100644
index 0000000..429db67
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_111ac0() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half res = fmax(arg_0, arg_1);
+}
+
+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/var/max/111ac0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.spvasm
new file mode 100644
index 0000000..379f8c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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 %max_111ac0 "max_111ac0"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_111ac0 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+         %20 = OpLoad %half %arg_0
+         %21 = OpLoad %half %arg_1
+         %18 = OpExtInst %half %19 NMax %20 %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %max_111ac0
+               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 %max_111ac0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %max_111ac0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.wgsl
new file mode 100644
index 0000000..b91b325
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn max_111ac0() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var res : f16 = max(arg_0, arg_1);
+}
+
+@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/var/max/34956e.wgsl b/test/tint/builtins/gen/var/max/34956e.wgsl
new file mode 100644
index 0000000..600a3eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: vec2<f16> = max(arg_0, arg_1);
+}
+
+@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/var/max/34956e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..60c2e2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void max_34956e() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = max(arg_0, arg_1);
+}
+
+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/var/max/34956e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6402eb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void max_34956e() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = max(arg_0, arg_1);
+}
+
+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@0x0000024F90CA9900(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.glsl
new file mode 100644
index 0000000..93be2e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_34956e() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = max(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = max(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = max(arg_0, arg_1);
+}
+
+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/var/max/34956e.wgsl.expected.msl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.msl
new file mode 100644
index 0000000..c90bfeb
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_34956e() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 res = fmax(arg_0, arg_1);
+}
+
+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/var/max/34956e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.spvasm
new file mode 100644
index 0000000..f63b8cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %max_34956e "max_34956e"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_34956e = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v2half %arg_0
+         %22 = OpLoad %v2half %arg_1
+         %19 = OpExtInst %v2half %20 NMax %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %max_34956e
+               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 %max_34956e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %max_34956e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.wgsl
new file mode 100644
index 0000000..69327a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn max_34956e() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : vec2<f16> = max(arg_0, arg_1);
+}
+
+@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/var/max/445169.wgsl b/test/tint/builtins/gen/var/max/445169.wgsl
new file mode 100644
index 0000000..24aad61
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/445169.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: vec3<f16> = max(arg_0, arg_1);
+}
+
+@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/var/max/445169.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4b65af3
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void max_445169() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = max(arg_0, arg_1);
+}
+
+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/var/max/445169.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3f48199
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void max_445169() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = max(arg_0, arg_1);
+}
+
+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@0x000001DB65BB6D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.glsl
new file mode 100644
index 0000000..a524e0f
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_445169() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = max(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = max(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = max(arg_0, arg_1);
+}
+
+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/var/max/445169.wgsl.expected.msl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.msl
new file mode 100644
index 0000000..3f2fe1e
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_445169() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 res = fmax(arg_0, arg_1);
+}
+
+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/var/max/445169.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/445169.wgsl.expected.spvasm
new file mode 100644
index 0000000..5a3366e
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %max_445169 "max_445169"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_445169 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %v3half %20 NMax %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %max_445169
+               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 %max_445169
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %max_445169
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.wgsl
new file mode 100644
index 0000000..e21636f
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn max_445169() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : vec3<f16> = max(arg_0, arg_1);
+}
+
+@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/var/max/e14f2b.wgsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl
new file mode 100644
index 0000000..12fd3d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: vec4<f16> = max(arg_0, arg_1);
+}
+
+@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/var/max/e14f2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c0f6659
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void max_e14f2b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = max(arg_0, arg_1);
+}
+
+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/var/max/e14f2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1251ca9
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void max_e14f2b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = max(arg_0, arg_1);
+}
+
+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@0x0000026D512195F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.glsl
new file mode 100644
index 0000000..9c13143
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_e14f2b() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = max(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = max(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = max(arg_0, arg_1);
+}
+
+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/var/max/e14f2b.wgsl.expected.msl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.msl
new file mode 100644
index 0000000..4410e6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_e14f2b() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 res = fmax(arg_0, arg_1);
+}
+
+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/var/max/e14f2b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.spvasm
new file mode 100644
index 0000000..99fc971
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %max_e14f2b "max_e14f2b"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_e14f2b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v4half %arg_0
+         %22 = OpLoad %v4half %arg_1
+         %19 = OpExtInst %v4half %20 NMax %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %max_e14f2b
+               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 %max_e14f2b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %max_e14f2b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.wgsl
new file mode 100644
index 0000000..446f509
--- /dev/null
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn max_e14f2b() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : vec4<f16> = max(arg_0, arg_1);
+}
+
+@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/var/min/7c710a.wgsl b/test/tint/builtins/gen/var/min/7c710a.wgsl
new file mode 100644
index 0000000..1ccd54e
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: vec4<f16> = min(arg_0, arg_1);
+}
+
+@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/var/min/7c710a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c47899a
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void min_7c710a() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = min(arg_0, arg_1);
+}
+
+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/var/min/7c710a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1e7afd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void min_7c710a() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = min(arg_0, arg_1);
+}
+
+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@0x0000019DCD0014A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.glsl
new file mode 100644
index 0000000..e7acfb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_7c710a() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = min(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = min(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = min(arg_0, arg_1);
+}
+
+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/var/min/7c710a.wgsl.expected.msl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.msl
new file mode 100644
index 0000000..c3ccbdc
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_7c710a() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 res = fmin(arg_0, arg_1);
+}
+
+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/var/min/7c710a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.spvasm
new file mode 100644
index 0000000..d8aff45
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %min_7c710a "min_7c710a"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_7c710a = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v4half %arg_0
+         %22 = OpLoad %v4half %arg_1
+         %19 = OpExtInst %v4half %20 NMin %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %min_7c710a
+               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 %min_7c710a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %min_7c710a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.wgsl
new file mode 100644
index 0000000..24aba2c
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn min_7c710a() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : vec4<f16> = min(arg_0, arg_1);
+}
+
+@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/var/min/ab0acd.wgsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl
new file mode 100644
index 0000000..ea0e29c
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: vec3<f16> = min(arg_0, arg_1);
+}
+
+@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/var/min/ab0acd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..10c5fad
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void min_ab0acd() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = min(arg_0, arg_1);
+}
+
+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/var/min/ab0acd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5da4fb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void min_ab0acd() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = min(arg_0, arg_1);
+}
+
+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@0x0000019AECEC2DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.glsl
new file mode 100644
index 0000000..a8dfcfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_ab0acd() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = min(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = min(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = min(arg_0, arg_1);
+}
+
+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/var/min/ab0acd.wgsl.expected.msl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.msl
new file mode 100644
index 0000000..ecf13e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_ab0acd() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 res = fmin(arg_0, arg_1);
+}
+
+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/var/min/ab0acd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.spvasm
new file mode 100644
index 0000000..c3695bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %min_ab0acd "min_ab0acd"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_ab0acd = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %v3half %20 NMin %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %min_ab0acd
+               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 %min_ab0acd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %min_ab0acd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.wgsl
new file mode 100644
index 0000000..2c94144
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn min_ab0acd() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : vec3<f16> = min(arg_0, arg_1);
+}
+
+@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/var/min/ac84d6.wgsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl
new file mode 100644
index 0000000..8166c17
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var res: f16 = min(arg_0, arg_1);
+}
+
+@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/var/min/ac84d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..62864ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void min_ac84d6() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = min(arg_0, arg_1);
+}
+
+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/var/min/ac84d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..77aa23f
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void min_ac84d6() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = min(arg_0, arg_1);
+}
+
+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@0x00000216706F6E70(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000216706F6E70(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.glsl
new file mode 100644
index 0000000..e0ca81b
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_ac84d6() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = min(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = min(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = min(arg_0, arg_1);
+}
+
+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/var/min/ac84d6.wgsl.expected.msl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.msl
new file mode 100644
index 0000000..c8f31e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_ac84d6() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half res = fmin(arg_0, arg_1);
+}
+
+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/var/min/ac84d6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.spvasm
new file mode 100644
index 0000000..3f048ea8
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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 %min_ac84d6 "min_ac84d6"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_ac84d6 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+         %20 = OpLoad %half %arg_0
+         %21 = OpLoad %half %arg_1
+         %18 = OpExtInst %half %19 NMin %20 %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %min_ac84d6
+               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 %min_ac84d6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %min_ac84d6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.wgsl
new file mode 100644
index 0000000..508794c
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn min_ac84d6() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var res : f16 = min(arg_0, arg_1);
+}
+
+@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/var/min/e780f9.wgsl b/test/tint/builtins/gen/var/min/e780f9.wgsl
new file mode 100644
index 0000000..58e70eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: vec2<f16> = min(arg_0, arg_1);
+}
+
+@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/var/min/e780f9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b2b207d
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void min_e780f9() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = min(arg_0, arg_1);
+}
+
+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/var/min/e780f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a24d5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void min_e780f9() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = min(arg_0, arg_1);
+}
+
+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@0x000001C199F46BD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.glsl
new file mode 100644
index 0000000..7942c5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_e780f9() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = min(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = min(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = min(arg_0, arg_1);
+}
+
+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/var/min/e780f9.wgsl.expected.msl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.msl
new file mode 100644
index 0000000..49649a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_e780f9() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 res = fmin(arg_0, arg_1);
+}
+
+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/var/min/e780f9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.spvasm
new file mode 100644
index 0000000..aac4bd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %min_e780f9 "min_e780f9"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_e780f9 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v2half %arg_0
+         %22 = OpLoad %v2half %arg_1
+         %19 = OpExtInst %v2half %20 NMin %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %min_e780f9
+               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 %min_e780f9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %min_e780f9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.wgsl
new file mode 100644
index 0000000..ce1ac48
--- /dev/null
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn min_e780f9() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : vec2<f16> = min(arg_0, arg_1);
+}
+
+@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/var/mix/38cbbb.wgsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl
new file mode 100644
index 0000000..c319eea
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res: f16 = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/38cbbb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a0edd4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void mix_38cbbb() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = lerp(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/38cbbb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f7267d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void mix_38cbbb() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = lerp(arg_0, arg_1, arg_2);
+}
+
+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@0x00000265C36E19E0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000265C36E19E0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.glsl
new file mode 100644
index 0000000..c5da856
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_38cbbb() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/38cbbb.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.msl
new file mode 100644
index 0000000..45b6845
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_38cbbb() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half arg_2 = 0.0h;
+  half res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/38cbbb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.spvasm
new file mode 100644
index 0000000..601a4f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %mix_38cbbb "mix_38cbbb"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_38cbbb = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+      %arg_2 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+               OpStore %arg_2 %14
+         %21 = OpLoad %half %arg_0
+         %22 = OpLoad %half %arg_1
+         %23 = OpLoad %half %arg_2
+         %19 = OpExtInst %half %20 FMix %21 %22 %23
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %mix_38cbbb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %mix_38cbbb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %mix_38cbbb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.wgsl
new file mode 100644
index 0000000..8905057
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn mix_38cbbb() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res : f16 = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/63f2fd.wgsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl
new file mode 100644
index 0000000..b68ae29
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res: vec3<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/63f2fd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..64200d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void mix_63f2fd() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/63f2fd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a54e8bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void mix_63f2fd() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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@0x0000021DB787B5D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.glsl
new file mode 100644
index 0000000..21b513d
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_63f2fd() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/63f2fd.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.msl
new file mode 100644
index 0000000..434d37a
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_63f2fd() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 arg_2 = half3(0.0h);
+  half3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/63f2fd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.spvasm
new file mode 100644
index 0000000..44f6f95
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_63f2fd = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v3half %arg_0
+         %23 = OpLoad %v3half %arg_1
+         %24 = OpLoad %v3half %arg_2
+         %20 = OpExtInst %v3half %21 FMix %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %mix_63f2fd
+               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 %mix_63f2fd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %mix_63f2fd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.wgsl
new file mode 100644
index 0000000..803966f
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn mix_63f2fd() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res : vec3<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/98ee3e.wgsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl
new file mode 100644
index 0000000..4ad0e03
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res: vec2<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/98ee3e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4c9b6cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void mix_98ee3e() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/98ee3e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..034d036
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void mix_98ee3e() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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@0x00000261CFF10B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.glsl
new file mode 100644
index 0000000..4fe64a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_98ee3e() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/98ee3e.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.msl
new file mode 100644
index 0000000..6dab70b
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_98ee3e() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 arg_2 = half2(0.0h);
+  half2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/98ee3e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.spvasm
new file mode 100644
index 0000000..94ac72e
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_98ee3e = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v2half %arg_0
+         %23 = OpLoad %v2half %arg_1
+         %24 = OpLoad %v2half %arg_2
+         %20 = OpExtInst %v2half %21 FMix %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %mix_98ee3e
+               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 %mix_98ee3e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %mix_98ee3e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.wgsl
new file mode 100644
index 0000000..28738df
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn mix_98ee3e() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res : vec2<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/c1aec6.wgsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl
new file mode 100644
index 0000000..6eabaff
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = f16();
+  var res: vec3<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/c1aec6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fae485c
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void mix_c1aec6() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 3> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/c1aec6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c8b6210
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void mix_c1aec6() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 3> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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@0x000002489FE7D9C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(4,13-17): error X3000: unrecognized identifier 'arg_2'
+
diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.glsl
new file mode 100644
index 0000000..8eba390
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_c1aec6() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/c1aec6.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.msl
new file mode 100644
index 0000000..c8161a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_c1aec6() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half arg_2 = 0.0h;
+  half3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/c1aec6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.spvasm
new file mode 100644
index 0000000..e20acfd
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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 %mix_c1aec6 "mix_c1aec6"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %19 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_c1aec6 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_half Function %19
+         %27 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %19
+         %24 = OpLoad %v3half %arg_0
+         %25 = OpLoad %v3half %arg_1
+         %26 = OpLoad %half %arg_2
+         %28 = OpCompositeConstruct %v3half %26 %26 %26
+         %22 = OpExtInst %v3half %23 FMix %24 %25 %28
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_c1aec6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %mix_c1aec6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %mix_c1aec6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.wgsl
new file mode 100644
index 0000000..a66c0bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn mix_c1aec6() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = f16();
+  var res : vec3<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/e46a83.wgsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl
new file mode 100644
index 0000000..2dc7e65
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = f16();
+  var res: vec2<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/e46a83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f857864
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void mix_e46a83() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 2> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/e46a83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..088d879
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void mix_e46a83() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 2> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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@0x000001F3F7264500(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(4,13-17): error X3000: unrecognized identifier 'arg_2'
+
diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.glsl
new file mode 100644
index 0000000..63c9a84
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_e46a83() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/e46a83.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.msl
new file mode 100644
index 0000000..8fdd8f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_e46a83() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half arg_2 = 0.0h;
+  half2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/e46a83.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.spvasm
new file mode 100644
index 0000000..228e018
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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 %mix_e46a83 "mix_e46a83"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %19 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_e46a83 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_half Function %19
+         %27 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %19
+         %24 = OpLoad %v2half %arg_0
+         %25 = OpLoad %v2half %arg_1
+         %26 = OpLoad %half %arg_2
+         %28 = OpCompositeConstruct %v2half %26 %26
+         %22 = OpExtInst %v2half %23 FMix %24 %25 %28
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_e46a83
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %mix_e46a83
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %mix_e46a83
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.wgsl
new file mode 100644
index 0000000..f08146c
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn mix_e46a83() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = f16();
+  var res : vec2<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/ee2468.wgsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl
new file mode 100644
index 0000000..63a6075
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res: vec4<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/ee2468.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7ddd927
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void mix_ee2468() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/ee2468.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7e6e6f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void mix_ee2468() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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@0x00000122D9269150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.glsl
new file mode 100644
index 0000000..7ca5dd0
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_ee2468() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/ee2468.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.msl
new file mode 100644
index 0000000..f08697a
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_ee2468() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 arg_2 = half4(0.0h);
+  half4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/ee2468.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.spvasm
new file mode 100644
index 0000000..57a262c
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_ee2468 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v4half %arg_0
+         %23 = OpLoad %v4half %arg_1
+         %24 = OpLoad %v4half %arg_2
+         %20 = OpExtInst %v4half %21 FMix %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %mix_ee2468
+               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 %mix_ee2468
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %mix_ee2468
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.wgsl
new file mode 100644
index 0000000..1ab0394
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn mix_ee2468() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res : vec4<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/f1a543.wgsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl
new file mode 100644
index 0000000..fc47f42
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = f16();
+  var res: vec4<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/mix/f1a543.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e21963a
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void mix_f1a543() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 4> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/f1a543.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97176f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void mix_f1a543() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 4> res = lerp(arg_0, arg_1, arg_2);
+}
+
+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@0x0000027B644EDA60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(4,13-17): error X3000: unrecognized identifier 'arg_2'
+
diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.glsl
new file mode 100644
index 0000000..4b023e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_f1a543() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/f1a543.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.msl
new file mode 100644
index 0000000..2f8163d
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_f1a543() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half arg_2 = 0.0h;
+  half4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/mix/f1a543.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd6d009
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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 %mix_f1a543 "mix_f1a543"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %19 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_f1a543 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_half Function %19
+         %27 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %19
+         %24 = OpLoad %v4half %arg_0
+         %25 = OpLoad %v4half %arg_1
+         %26 = OpLoad %half %arg_2
+         %28 = OpCompositeConstruct %v4half %26 %26 %26 %26
+         %22 = OpExtInst %v4half %23 FMix %24 %25 %28
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_f1a543
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %mix_f1a543
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %mix_f1a543
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.wgsl
new file mode 100644
index 0000000..ee4f14c
--- /dev/null
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn mix_f1a543() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = f16();
+  var res : vec4<f16> = mix(arg_0, arg_1, arg_2);
+}
+
+@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/var/modf/45005f.wgsl b/test/tint/builtins/gen/var/modf/45005f.wgsl
new file mode 100644
index 0000000..7576567
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res = modf(arg_0);
+}
+
+@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/var/modf/45005f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e6631d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+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() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  modf_result_vec3_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/45005f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..64e0fc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+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() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  modf_result_vec3_f16 res = tint_modf(arg_0);
+}
+
+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@0x0000022A03927740(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.glsl
new file mode 100644
index 0000000..238c3c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  modf_result_vec3_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  modf_result_vec3_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  modf_result_vec3_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/45005f.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.msl
new file mode 100644
index 0000000..736c945
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half3 arg_0 = half3(0.0h);
+  modf_result_vec3_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/45005f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.spvasm
new file mode 100644
index 0000000..ff3de45
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %modf_45005f "modf_45005f"
+               OpName %arg_0 "arg_0"
+               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
+         %15 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+%__modf_result_vec3_f16 = OpTypeStruct %v3half %v3half
+%_ptr_Function___modf_result_vec3_f16 = OpTypePointer Function %__modf_result_vec3_f16
+         %24 = OpConstantNull %__modf_result_vec3_f16
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_45005f = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function___modf_result_vec3_f16 Function %24
+               OpStore %arg_0 %15
+         %21 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %__modf_result_vec3_f16 %20 ModfStruct %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %modf_45005f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %modf_45005f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %modf_45005f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.wgsl
new file mode 100644
index 0000000..987ba8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn modf_45005f() {
+  var arg_0 = vec3<f16>(f16());
+  var res = modf(arg_0);
+}
+
+@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/var/modf/8dbbbf.wgsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl
new file mode 100644
index 0000000..057c908
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res = modf(arg_0);
+}
+
+@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/var/modf/8dbbbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..53bf292
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+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() {
+  float16_t arg_0 = float16_t(0.0h);
+  modf_result_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/8dbbbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..db80c1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+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() {
+  float16_t arg_0 = float16_t(0.0h);
+  modf_result_f16 res = tint_modf(arg_0);
+}
+
+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@0x000001A838D20100(2,3-11): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.glsl
new file mode 100644
index 0000000..38e8cf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  float16_t arg_0 = 0.0hf;
+  modf_result_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  float16_t arg_0 = 0.0hf;
+  modf_result_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  float16_t arg_0 = 0.0hf;
+  modf_result_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/8dbbbf.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.msl
new file mode 100644
index 0000000..feb1621
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half arg_0 = 0.0h;
+  modf_result_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/8dbbbf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.spvasm
new file mode 100644
index 0000000..d4ab1c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; 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 %modf_8dbbbf "modf_8dbbbf"
+               OpName %arg_0 "arg_0"
+               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
+         %14 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+%__modf_result_f16 = OpTypeStruct %half %half
+%_ptr_Function___modf_result_f16 = OpTypePointer Function %__modf_result_f16
+         %23 = OpConstantNull %__modf_result_f16
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_8dbbbf = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function___modf_result_f16 Function %23
+               OpStore %arg_0 %14
+         %20 = OpLoad %half %arg_0
+         %17 = OpExtInst %__modf_result_f16 %19 ModfStruct %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %modf_8dbbbf
+               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 %modf_8dbbbf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %modf_8dbbbf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.wgsl
new file mode 100644
index 0000000..5e07687
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn modf_8dbbbf() {
+  var arg_0 = f16();
+  var res = modf(arg_0);
+}
+
+@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/var/modf/995934.wgsl b/test/tint/builtins/gen/var/modf/995934.wgsl
new file mode 100644
index 0000000..b981c28
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res = modf(arg_0);
+}
+
+@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/var/modf/995934.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ee6f076
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+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() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  modf_result_vec4_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/995934.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d2a2137
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+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() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  modf_result_vec4_f16 res = tint_modf(arg_0);
+}
+
+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@0x0000022D4D8C17A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.glsl
new file mode 100644
index 0000000..8bef4a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  modf_result_vec4_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  modf_result_vec4_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  modf_result_vec4_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/995934.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.msl
new file mode 100644
index 0000000..8f32c42
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half4 arg_0 = half4(0.0h);
+  modf_result_vec4_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/995934.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.spvasm
new file mode 100644
index 0000000..ddb7405
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %modf_995934 "modf_995934"
+               OpName %arg_0 "arg_0"
+               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
+         %15 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+%__modf_result_vec4_f16 = OpTypeStruct %v4half %v4half
+%_ptr_Function___modf_result_vec4_f16 = OpTypePointer Function %__modf_result_vec4_f16
+         %24 = OpConstantNull %__modf_result_vec4_f16
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_995934 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function___modf_result_vec4_f16 Function %24
+               OpStore %arg_0 %15
+         %21 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %__modf_result_vec4_f16 %20 ModfStruct %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %modf_995934
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %modf_995934
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %modf_995934
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.wgsl
new file mode 100644
index 0000000..a1ed549
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn modf_995934() {
+  var arg_0 = vec4<f16>(f16());
+  var res = modf(arg_0);
+}
+
+@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/var/modf/a545b9.wgsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl
new file mode 100644
index 0000000..8911086
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res = modf(arg_0);
+}
+
+@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/var/modf/a545b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..66e40ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+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() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  modf_result_vec2_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/a545b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..412c83d
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+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() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  modf_result_vec2_f16 res = tint_modf(arg_0);
+}
+
+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@0x000001F329190D80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.glsl
new file mode 100644
index 0000000..3d59c41
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.glsl
@@ -0,0 +1,91 @@
+#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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  modf_result_vec2_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  modf_result_vec2_f16 res = tint_modf(arg_0);
+}
+
+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() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  modf_result_vec2_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/a545b9.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.msl
new file mode 100644
index 0000000..7330f6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.msl
@@ -0,0 +1,45 @@
+#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() {
+  half2 arg_0 = half2(0.0h);
+  modf_result_vec2_f16 res = tint_modf(arg_0);
+}
+
+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/var/modf/a545b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..a862a6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %modf_a545b9 "modf_a545b9"
+               OpName %arg_0 "arg_0"
+               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
+         %15 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+%__modf_result_vec2_f16 = OpTypeStruct %v2half %v2half
+%_ptr_Function___modf_result_vec2_f16 = OpTypePointer Function %__modf_result_vec2_f16
+         %24 = OpConstantNull %__modf_result_vec2_f16
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_a545b9 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function___modf_result_vec2_f16 Function %24
+               OpStore %arg_0 %15
+         %21 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %__modf_result_vec2_f16 %20 ModfStruct %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %modf_a545b9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %modf_a545b9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %modf_a545b9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..9016659
--- /dev/null
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn modf_a545b9() {
+  var arg_0 = vec2<f16>(f16());
+  var res = modf(arg_0);
+}
+
+@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/var/normalize/39d5ec.wgsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl
new file mode 100644
index 0000000..9d4465d
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = normalize(arg_0);
+}
+
+@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/var/normalize/39d5ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..27279be
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void normalize_39d5ec() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = normalize(arg_0);
+}
+
+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/var/normalize/39d5ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0515aa9
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void normalize_39d5ec() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = normalize(arg_0);
+}
+
+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@0x0000026F4DE48920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F4DE48920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.glsl
new file mode 100644
index 0000000..cac08b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_39d5ec() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = normalize(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = normalize(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = normalize(arg_0);
+}
+
+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/var/normalize/39d5ec.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.msl
new file mode 100644
index 0000000..b39c9b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void normalize_39d5ec() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = normalize(arg_0);
+}
+
+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/var/normalize/39d5ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.spvasm
new file mode 100644
index 0000000..7ee6ac0
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %normalize_39d5ec "normalize_39d5ec"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%normalize_39d5ec = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Normalize %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %normalize_39d5ec
+               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 %normalize_39d5ec
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %normalize_39d5ec
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.wgsl
new file mode 100644
index 0000000..a1dddf1
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn normalize_39d5ec() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = normalize(arg_0);
+}
+
+@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/var/normalize/7990f3.wgsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl
new file mode 100644
index 0000000..46bb41b
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = normalize(arg_0);
+}
+
+@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/var/normalize/7990f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5609e8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void normalize_7990f3() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = normalize(arg_0);
+}
+
+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/var/normalize/7990f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ef29d84
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void normalize_7990f3() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = normalize(arg_0);
+}
+
+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@0x00000234A30F1570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000234A30F1570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.glsl
new file mode 100644
index 0000000..f5baf36
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_7990f3() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = normalize(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = normalize(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = normalize(arg_0);
+}
+
+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/var/normalize/7990f3.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.msl
new file mode 100644
index 0000000..92d318a
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void normalize_7990f3() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = normalize(arg_0);
+}
+
+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/var/normalize/7990f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..1df719a
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %normalize_7990f3 "normalize_7990f3"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%normalize_7990f3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Normalize %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %normalize_7990f3
+               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 %normalize_7990f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %normalize_7990f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..3629918
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn normalize_7990f3() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = normalize(arg_0);
+}
+
+@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/var/normalize/b8cb8d.wgsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl
new file mode 100644
index 0000000..ef4811d
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = normalize(arg_0);
+}
+
+@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/var/normalize/b8cb8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7a7baea
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void normalize_b8cb8d() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = normalize(arg_0);
+}
+
+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/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04068803
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void normalize_b8cb8d() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = normalize(arg_0);
+}
+
+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@0x0000021732CD97D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021732CD97D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.glsl
new file mode 100644
index 0000000..d578fb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_b8cb8d() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = normalize(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = normalize(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = normalize(arg_0);
+}
+
+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/var/normalize/b8cb8d.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.msl
new file mode 100644
index 0000000..0534833
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void normalize_b8cb8d() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = normalize(arg_0);
+}
+
+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/var/normalize/b8cb8d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.spvasm
new file mode 100644
index 0000000..f904ec0
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %normalize_b8cb8d "normalize_b8cb8d"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%normalize_b8cb8d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Normalize %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %normalize_b8cb8d
+               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 %normalize_b8cb8d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %normalize_b8cb8d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4793ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn normalize_b8cb8d() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = normalize(arg_0);
+}
+
+@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/var/pow/4f33b2.wgsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl
new file mode 100644
index 0000000..86f18ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: vec4<f16> = pow(arg_0, arg_1);
+}
+
+@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/var/pow/4f33b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..227638c
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void pow_4f33b2() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = pow(arg_0, arg_1);
+}
+
+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/var/pow/4f33b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..11cb081
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void pow_4f33b2() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = pow(arg_0, arg_1);
+}
+
+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@0x000001C8CA6D2360(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.glsl
new file mode 100644
index 0000000..5986eca
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_4f33b2() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = pow(arg_0, arg_1);
+}
+
+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/var/pow/4f33b2.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.msl
new file mode 100644
index 0000000..c9055df
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_4f33b2() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 res = pow(arg_0, arg_1);
+}
+
+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/var/pow/4f33b2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.spvasm
new file mode 100644
index 0000000..ab794c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %pow_4f33b2 "pow_4f33b2"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_4f33b2 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v4half %arg_0
+         %22 = OpLoad %v4half %arg_1
+         %19 = OpExtInst %v4half %20 Pow %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %pow_4f33b2
+               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 %pow_4f33b2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %pow_4f33b2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.wgsl
new file mode 100644
index 0000000..3ae3aa1
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn pow_4f33b2() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : vec4<f16> = pow(arg_0, arg_1);
+}
+
+@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/var/pow/ce9ef5.wgsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl
new file mode 100644
index 0000000..8ce27eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var res: f16 = pow(arg_0, arg_1);
+}
+
+@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/var/pow/ce9ef5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..648dc41
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void pow_ce9ef5() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = pow(arg_0, arg_1);
+}
+
+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/var/pow/ce9ef5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a893034
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void pow_ce9ef5() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = pow(arg_0, arg_1);
+}
+
+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@0x000001987C544730(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001987C544730(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.glsl
new file mode 100644
index 0000000..204e570
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_ce9ef5() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = pow(arg_0, arg_1);
+}
+
+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/var/pow/ce9ef5.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.msl
new file mode 100644
index 0000000..53588ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_ce9ef5() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half res = pow(arg_0, arg_1);
+}
+
+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/var/pow/ce9ef5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.spvasm
new file mode 100644
index 0000000..740fe21
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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 %pow_ce9ef5 "pow_ce9ef5"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_ce9ef5 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+         %20 = OpLoad %half %arg_0
+         %21 = OpLoad %half %arg_1
+         %18 = OpExtInst %half %19 Pow %20 %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %pow_ce9ef5
+               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 %pow_ce9ef5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %pow_ce9ef5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.wgsl
new file mode 100644
index 0000000..da1a0f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn pow_ce9ef5() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var res : f16 = pow(arg_0, arg_1);
+}
+
+@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/var/pow/f37b25.wgsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl
new file mode 100644
index 0000000..cdaa364
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: vec2<f16> = pow(arg_0, arg_1);
+}
+
+@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/var/pow/f37b25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1656a09
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void pow_f37b25() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = pow(arg_0, arg_1);
+}
+
+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/var/pow/f37b25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..49f883c
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void pow_f37b25() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = pow(arg_0, arg_1);
+}
+
+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@0x0000018483F919C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.glsl
new file mode 100644
index 0000000..c666706
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_f37b25() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = pow(arg_0, arg_1);
+}
+
+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/var/pow/f37b25.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.msl
new file mode 100644
index 0000000..d608b91
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_f37b25() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 res = pow(arg_0, arg_1);
+}
+
+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/var/pow/f37b25.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.spvasm
new file mode 100644
index 0000000..34746c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %pow_f37b25 "pow_f37b25"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_f37b25 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v2half %arg_0
+         %22 = OpLoad %v2half %arg_1
+         %19 = OpExtInst %v2half %20 Pow %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %pow_f37b25
+               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 %pow_f37b25
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %pow_f37b25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c2e6fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn pow_f37b25() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : vec2<f16> = pow(arg_0, arg_1);
+}
+
+@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/var/pow/fa5429.wgsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl
new file mode 100644
index 0000000..2a6ad11
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: vec3<f16> = pow(arg_0, arg_1);
+}
+
+@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/var/pow/fa5429.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fd9cab2
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void pow_fa5429() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = pow(arg_0, arg_1);
+}
+
+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/var/pow/fa5429.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9bad326
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void pow_fa5429() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = pow(arg_0, arg_1);
+}
+
+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@0x000001E461739570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.glsl
new file mode 100644
index 0000000..c57ea28
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_fa5429() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = pow(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = pow(arg_0, arg_1);
+}
+
+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/var/pow/fa5429.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.msl
new file mode 100644
index 0000000..34042bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_fa5429() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 res = pow(arg_0, arg_1);
+}
+
+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/var/pow/fa5429.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.spvasm
new file mode 100644
index 0000000..88b8df2
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %pow_fa5429 "pow_fa5429"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_fa5429 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %v3half %20 Pow %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %pow_fa5429
+               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 %pow_fa5429
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %pow_fa5429
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.wgsl
new file mode 100644
index 0000000..41114c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn pow_fa5429() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : vec3<f16> = pow(arg_0, arg_1);
+}
+
+@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/var/radians/208fd9.wgsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl
new file mode 100644
index 0000000..5bf9902
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = radians(arg_0);
+}
+
+@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/var/radians/208fd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..627ac2c
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+float16_t tint_radians(float16_t param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_208fd9() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_radians(arg_0);
+}
+
+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/var/radians/208fd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d26e91e
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+float16_t tint_radians(float16_t param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_208fd9() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tint_radians(arg_0);
+}
+
+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@0x0000025E7A643540(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.glsl
new file mode 100644
index 0000000..d22a648
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = 0.0hf;
+  float16_t res = tint_radians(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_radians(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tint_radians(arg_0);
+}
+
+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/var/radians/208fd9.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.msl
new file mode 100644
index 0000000..9362203
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half tint_radians(half param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_208fd9() {
+  half arg_0 = 0.0h;
+  half res = tint_radians(arg_0);
+}
+
+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/var/radians/208fd9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.spvasm
new file mode 100644
index 0000000..40920c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_208fd9 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Radians %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %radians_208fd9
+               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 %radians_208fd9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %radians_208fd9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c78c61
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn radians_208fd9() {
+  var arg_0 = f16();
+  var res : f16 = radians(arg_0);
+}
+
+@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/var/radians/44f20b.wgsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl
new file mode 100644
index 0000000..0cfd500
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = radians(arg_0);
+}
+
+@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/var/radians/44f20b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..81c50d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+vector<float16_t, 4> tint_radians(vector<float16_t, 4> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_44f20b() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_radians(arg_0);
+}
+
+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/var/radians/44f20b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e58dd03
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tint_radians(arg_0);
+}
+
+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@0x000001F25F161620(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.glsl
new file mode 100644
index 0000000..ef20747
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_radians(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_radians(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tint_radians(arg_0);
+}
+
+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/var/radians/44f20b.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.msl
new file mode 100644
index 0000000..d2f6566
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half4 tint_radians(half4 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_44f20b() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = tint_radians(arg_0);
+}
+
+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/var/radians/44f20b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.spvasm
new file mode 100644
index 0000000..f11ab7a
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %radians_44f20b "radians_44f20b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_44f20b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Radians %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %radians_44f20b
+               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 %radians_44f20b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %radians_44f20b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.wgsl
new file mode 100644
index 0000000..96830d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn radians_44f20b() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = radians(arg_0);
+}
+
+@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/var/radians/7ea4c7.wgsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl
new file mode 100644
index 0000000..693ec90
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = radians(arg_0);
+}
+
+@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/var/radians/7ea4c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3367a75
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+vector<float16_t, 3> tint_radians(vector<float16_t, 3> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_7ea4c7() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_radians(arg_0);
+}
+
+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/var/radians/7ea4c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ca0996d
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tint_radians(arg_0);
+}
+
+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@0x0000020CCED30150(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.glsl
new file mode 100644
index 0000000..8d3f103
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_radians(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_radians(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tint_radians(arg_0);
+}
+
+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/var/radians/7ea4c7.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.msl
new file mode 100644
index 0000000..a77294f
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half3 tint_radians(half3 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_7ea4c7() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = tint_radians(arg_0);
+}
+
+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/var/radians/7ea4c7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.spvasm
new file mode 100644
index 0000000..5177184
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %radians_7ea4c7 "radians_7ea4c7"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_7ea4c7 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Radians %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %radians_7ea4c7
+               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 %radians_7ea4c7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %radians_7ea4c7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.wgsl
new file mode 100644
index 0000000..2107e43
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn radians_7ea4c7() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = radians(arg_0);
+}
+
+@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/var/radians/fbacf0.wgsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl
new file mode 100644
index 0000000..87814c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = radians(arg_0);
+}
+
+@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/var/radians/fbacf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8316865
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+vector<float16_t, 2> tint_radians(vector<float16_t, 2> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_fbacf0() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_radians(arg_0);
+}
+
+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/var/radians/fbacf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0ea92ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+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> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tint_radians(arg_0);
+}
+
+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@0x000002290DE021A0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.glsl
new file mode 100644
index 0000000..f53a087
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.glsl
@@ -0,0 +1,70 @@
+#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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_radians(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_radians(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tint_radians(arg_0);
+}
+
+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/var/radians/fbacf0.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.msl
new file mode 100644
index 0000000..6dcfa5b
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.msl
@@ -0,0 +1,39 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half2 tint_radians(half2 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_fbacf0() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = tint_radians(arg_0);
+}
+
+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/var/radians/fbacf0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.spvasm
new file mode 100644
index 0000000..aa11ee5
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %radians_fbacf0 "radians_fbacf0"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_fbacf0 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Radians %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %radians_fbacf0
+               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 %radians_fbacf0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %radians_fbacf0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.wgsl
new file mode 100644
index 0000000..d463eb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn radians_fbacf0() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = radians(arg_0);
+}
+
+@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/var/reflect/310de5.wgsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl
new file mode 100644
index 0000000..6fd29f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: vec4<f16> = reflect(arg_0, arg_1);
+}
+
+@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/var/reflect/310de5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..42cc8e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void reflect_310de5() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/310de5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..30317a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void reflect_310de5() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = reflect(arg_0, arg_1);
+}
+
+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@0x000001A447B2CCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.glsl
new file mode 100644
index 0000000..1b9cab0
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_310de5() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = reflect(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = reflect(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/310de5.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.msl
new file mode 100644
index 0000000..bc73148
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void reflect_310de5() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/310de5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.spvasm
new file mode 100644
index 0000000..bcace4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %reflect_310de5 "reflect_310de5"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%reflect_310de5 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v4half %arg_0
+         %22 = OpLoad %v4half %arg_1
+         %19 = OpExtInst %v4half %20 Reflect %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %reflect_310de5
+               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 %reflect_310de5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %reflect_310de5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.wgsl
new file mode 100644
index 0000000..09432f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn reflect_310de5() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : vec4<f16> = reflect(arg_0, arg_1);
+}
+
+@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/var/reflect/61ca21.wgsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl
new file mode 100644
index 0000000..f7ae376
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: vec3<f16> = reflect(arg_0, arg_1);
+}
+
+@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/var/reflect/61ca21.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..75d4007
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void reflect_61ca21() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/61ca21.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7f3977e
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void reflect_61ca21() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = reflect(arg_0, arg_1);
+}
+
+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@0x000002B6431BD140(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.glsl
new file mode 100644
index 0000000..ab22f2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_61ca21() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = reflect(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = reflect(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/61ca21.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.msl
new file mode 100644
index 0000000..7ffb26a
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void reflect_61ca21() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/61ca21.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.spvasm
new file mode 100644
index 0000000..ad8f002
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %reflect_61ca21 "reflect_61ca21"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%reflect_61ca21 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %v3half %20 Reflect %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %reflect_61ca21
+               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 %reflect_61ca21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %reflect_61ca21
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.wgsl
new file mode 100644
index 0000000..c7e04a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn reflect_61ca21() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : vec3<f16> = reflect(arg_0, arg_1);
+}
+
+@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/var/reflect/bb15ac.wgsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl
new file mode 100644
index 0000000..ae704f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: vec2<f16> = reflect(arg_0, arg_1);
+}
+
+@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/var/reflect/bb15ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..445e4f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void reflect_bb15ac() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/bb15ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7979837
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void reflect_bb15ac() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = reflect(arg_0, arg_1);
+}
+
+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@0x000001D1F2206F80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.glsl
new file mode 100644
index 0000000..a52e6db
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_bb15ac() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = reflect(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = reflect(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/bb15ac.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.msl
new file mode 100644
index 0000000..bee45f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void reflect_bb15ac() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 res = reflect(arg_0, arg_1);
+}
+
+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/var/reflect/bb15ac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.spvasm
new file mode 100644
index 0000000..9af402b
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %reflect_bb15ac "reflect_bb15ac"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%reflect_bb15ac = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v2half %arg_0
+         %22 = OpLoad %v2half %arg_1
+         %19 = OpExtInst %v2half %20 Reflect %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %reflect_bb15ac
+               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 %reflect_bb15ac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %reflect_bb15ac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.wgsl
new file mode 100644
index 0000000..68a49b2
--- /dev/null
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn reflect_bb15ac() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : vec2<f16> = reflect(arg_0, arg_1);
+}
+
+@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/var/refract/0594ba.wgsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl
new file mode 100644
index 0000000..f683301
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = f16();
+  var res: vec4<f16> = refract(arg_0, arg_1, arg_2);
+}
+
+@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/var/refract/0594ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..463d65f
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void refract_0594ba() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 4> res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/0594ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9201cef
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void refract_0594ba() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 4> res = refract(arg_0, arg_1, arg_2);
+}
+
+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@0x000001D61952A880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(4,13-17): error X3000: unrecognized identifier 'arg_2'
+
diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.glsl
new file mode 100644
index 0000000..cd98e86
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_0594ba() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec4 res = refract(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec4 res = refract(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec4 res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/0594ba.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.msl
new file mode 100644
index 0000000..d0cb126
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void refract_0594ba() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half arg_2 = 0.0h;
+  half4 res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/0594ba.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.spvasm
new file mode 100644
index 0000000..c8b16c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; 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 %refract_0594ba "refract_0594ba"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %19 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%refract_0594ba = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_half Function %19
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %19
+         %24 = OpLoad %v4half %arg_0
+         %25 = OpLoad %v4half %arg_1
+         %26 = OpLoad %half %arg_2
+         %22 = OpExtInst %v4half %23 Refract %24 %25 %26
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %refract_0594ba
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %refract_0594ba
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %refract_0594ba
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.wgsl
new file mode 100644
index 0000000..d015c26
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn refract_0594ba() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = f16();
+  var res : vec4<f16> = refract(arg_0, arg_1, arg_2);
+}
+
+@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/var/refract/570cb3.wgsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl
new file mode 100644
index 0000000..1c5b953
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = f16();
+  var res: vec2<f16> = refract(arg_0, arg_1, arg_2);
+}
+
+@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/var/refract/570cb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..63ce95b
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void refract_570cb3() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 2> res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/570cb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7d3be7d
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void refract_570cb3() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 2> res = refract(arg_0, arg_1, arg_2);
+}
+
+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@0x000001BAD82D3A70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(4,13-17): error X3000: unrecognized identifier 'arg_2'
+
diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.glsl
new file mode 100644
index 0000000..16ff162
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_570cb3() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec2 res = refract(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec2 res = refract(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec2 res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/570cb3.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.msl
new file mode 100644
index 0000000..2051a9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void refract_570cb3() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half arg_2 = 0.0h;
+  half2 res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/570cb3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.spvasm
new file mode 100644
index 0000000..d7c52d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; 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 %refract_570cb3 "refract_570cb3"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %19 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%refract_570cb3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_half Function %19
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %19
+         %24 = OpLoad %v2half %arg_0
+         %25 = OpLoad %v2half %arg_1
+         %26 = OpLoad %half %arg_2
+         %22 = OpExtInst %v2half %23 Refract %24 %25 %26
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %refract_570cb3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %refract_570cb3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %refract_570cb3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.wgsl
new file mode 100644
index 0000000..8e2895c
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn refract_570cb3() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = f16();
+  var res : vec2<f16> = refract(arg_0, arg_1, arg_2);
+}
+
+@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/var/refract/8984af.wgsl b/test/tint/builtins/gen/var/refract/8984af.wgsl
new file mode 100644
index 0000000..1aa6ded
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = f16();
+  var res: vec3<f16> = refract(arg_0, arg_1, arg_2);
+}
+
+@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/var/refract/8984af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4c8b3e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void refract_8984af() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 3> res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/8984af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..260d085
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void refract_8984af() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  float16_t arg_2 = float16_t(0.0h);
+  vector<float16_t, 3> res = refract(arg_0, arg_1, arg_2);
+}
+
+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@0x000001BED048A880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(4,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(4,13-17): error X3000: unrecognized identifier 'arg_2'
+
diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.glsl
new file mode 100644
index 0000000..c44741e
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_8984af() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec3 res = refract(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec3 res = refract(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  float16_t arg_2 = 0.0hf;
+  f16vec3 res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/8984af.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.msl
new file mode 100644
index 0000000..8394944
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void refract_8984af() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half arg_2 = 0.0h;
+  half3 res = refract(arg_0, arg_1, arg_2);
+}
+
+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/var/refract/8984af.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.spvasm
new file mode 100644
index 0000000..4fd9ba8
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; 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 %refract_8984af "refract_8984af"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %19 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%refract_8984af = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_half Function %19
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %19
+         %24 = OpLoad %v3half %arg_0
+         %25 = OpLoad %v3half %arg_1
+         %26 = OpLoad %half %arg_2
+         %22 = OpExtInst %v3half %23 Refract %24 %25 %26
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %refract_8984af
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %refract_8984af
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %refract_8984af
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.wgsl
new file mode 100644
index 0000000..69d2b2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn refract_8984af() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = f16();
+  var res : vec3<f16> = refract(arg_0, arg_1, arg_2);
+}
+
+@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/var/round/9078ef.wgsl b/test/tint/builtins/gen/var/round/9078ef.wgsl
new file mode 100644
index 0000000..e52a222
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = round(arg_0);
+}
+
+@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/var/round/9078ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cc87dbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void round_9078ef() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = round(arg_0);
+}
+
+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/var/round/9078ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1f7b10
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void round_9078ef() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = round(arg_0);
+}
+
+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@0x0000021E2DBC1640(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E2DBC1640(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.glsl
new file mode 100644
index 0000000..0c0cd16
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_9078ef() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = round(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = round(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = round(arg_0);
+}
+
+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/var/round/9078ef.wgsl.expected.msl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.msl
new file mode 100644
index 0000000..c7e44da
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_9078ef() {
+  half arg_0 = 0.0h;
+  half res = rint(arg_0);
+}
+
+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/var/round/9078ef.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.spvasm
new file mode 100644
index 0000000..a5304a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_9078ef = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 RoundEven %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %round_9078ef
+               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 %round_9078ef
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %round_9078ef
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a6439d
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn round_9078ef() {
+  var arg_0 = f16();
+  var res : f16 = round(arg_0);
+}
+
+@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/var/round/d87e84.wgsl b/test/tint/builtins/gen/var/round/d87e84.wgsl
new file mode 100644
index 0000000..d130d95
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = round(arg_0);
+}
+
+@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/var/round/d87e84.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0c4ec1d
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void round_d87e84() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = round(arg_0);
+}
+
+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/var/round/d87e84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..95b83e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void round_d87e84() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = round(arg_0);
+}
+
+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@0x0000013FF5D11570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013FF5D11570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.glsl
new file mode 100644
index 0000000..bb031c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_d87e84() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = round(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = round(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = round(arg_0);
+}
+
+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/var/round/d87e84.wgsl.expected.msl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.msl
new file mode 100644
index 0000000..70a4f41
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_d87e84() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = rint(arg_0);
+}
+
+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/var/round/d87e84.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6956ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %round_d87e84 "round_d87e84"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_d87e84 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 RoundEven %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %round_d87e84
+               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 %round_d87e84
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %round_d87e84
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.wgsl
new file mode 100644
index 0000000..8911fc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn round_d87e84() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = round(arg_0);
+}
+
+@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/var/round/e1bba2.wgsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl
new file mode 100644
index 0000000..a4494e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = round(arg_0);
+}
+
+@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/var/round/e1bba2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..073bbfd
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void round_e1bba2() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = round(arg_0);
+}
+
+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/var/round/e1bba2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..64c5a88
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void round_e1bba2() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = round(arg_0);
+}
+
+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@0x000002DBC8633250(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DBC8633250(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.glsl
new file mode 100644
index 0000000..421df9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_e1bba2() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = round(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = round(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = round(arg_0);
+}
+
+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/var/round/e1bba2.wgsl.expected.msl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.msl
new file mode 100644
index 0000000..06bb618
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_e1bba2() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = rint(arg_0);
+}
+
+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/var/round/e1bba2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.spvasm
new file mode 100644
index 0000000..31be1c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %round_e1bba2 "round_e1bba2"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_e1bba2 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 RoundEven %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %round_e1bba2
+               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 %round_e1bba2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %round_e1bba2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd41b19
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn round_e1bba2() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = round(arg_0);
+}
+
+@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/var/round/f665b5.wgsl b/test/tint/builtins/gen/var/round/f665b5.wgsl
new file mode 100644
index 0000000..8297439
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = round(arg_0);
+}
+
+@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/var/round/f665b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..360cf4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void round_f665b5() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = round(arg_0);
+}
+
+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/var/round/f665b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1bdd81
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void round_f665b5() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = round(arg_0);
+}
+
+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@0x0000023EB7FA70D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023EB7FA70D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.glsl
new file mode 100644
index 0000000..d78cc6a
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_f665b5() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = round(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = round(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = round(arg_0);
+}
+
+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/var/round/f665b5.wgsl.expected.msl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.msl
new file mode 100644
index 0000000..fb7f28a
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_f665b5() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = rint(arg_0);
+}
+
+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/var/round/f665b5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.spvasm
new file mode 100644
index 0000000..7eea884
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %round_f665b5 "round_f665b5"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_f665b5 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 RoundEven %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %round_f665b5
+               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 %round_f665b5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %round_f665b5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.wgsl
new file mode 100644
index 0000000..b6afe2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn round_f665b5() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = round(arg_0);
+}
+
+@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/var/select/10e73b.wgsl b/test/tint/builtins/gen/var/select/10e73b.wgsl
new file mode 100644
index 0000000..9362b80
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = true;
+  var res: f16 = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/10e73b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..db83290
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void select_10e73b() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  bool arg_2 = true;
+  float16_t res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/10e73b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e8c0804
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void select_10e73b() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  bool arg_2 = true;
+  float16_t res = (arg_2 ? arg_1 : arg_0);
+}
+
+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@0x000001B6F116BCD0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B6F116BCD0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.glsl
new file mode 100644
index 0000000..aa73828
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_10e73b() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  bool arg_2 = true;
+  float16_t res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  bool arg_2 = true;
+  float16_t res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  bool arg_2 = true;
+  float16_t res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/10e73b.wgsl.expected.msl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.msl
new file mode 100644
index 0000000..f643c29
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_10e73b() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  bool arg_2 = true;
+  half res = select(arg_0, arg_1, arg_2);
+}
+
+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/var/select/10e73b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.spvasm
new file mode 100644
index 0000000..6f8609b
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %22 = OpConstantNull %bool
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_10e73b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+      %arg_2 = OpVariable %_ptr_Function_bool Function %22
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+               OpStore %arg_2 %true
+         %24 = OpLoad %bool %arg_2
+         %25 = OpLoad %half %arg_1
+         %26 = OpLoad %half %arg_0
+         %23 = OpSelect %half %24 %25 %26
+               OpStore %res %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %select_10e73b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %select_10e73b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %select_10e73b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.wgsl
new file mode 100644
index 0000000..a4cd0fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn select_10e73b() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = true;
+  var res : f16 = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/1ada2a.wgsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl
new file mode 100644
index 0000000..421c3ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = true;
+  var res: vec3<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/1ada2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cdb717c
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void select_1ada2a() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  bool arg_2 = true;
+  vector<float16_t, 3> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/1ada2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a7ddf09
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void select_1ada2a() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  bool arg_2 = true;
+  vector<float16_t, 3> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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@0x000001843DACE700(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.glsl
new file mode 100644
index 0000000..6111b1e
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_1ada2a() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  bool arg_2 = true;
+  f16vec3 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  bool arg_2 = true;
+  f16vec3 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  bool arg_2 = true;
+  f16vec3 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/1ada2a.wgsl.expected.msl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.msl
new file mode 100644
index 0000000..3f23636
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_1ada2a() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  bool arg_2 = true;
+  half3 res = select(arg_0, arg_1, arg_2);
+}
+
+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/var/select/1ada2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.spvasm
new file mode 100644
index 0000000..efd6a0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %23 = OpConstantNull %bool
+     %v3bool = OpTypeVector %bool 3
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+         %31 = OpConstantNull %v3bool
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_1ada2a = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_bool Function %23
+         %29 = OpVariable %_ptr_Function_v3bool Function %31
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %true
+         %25 = OpLoad %bool %arg_2
+         %26 = OpLoad %v3half %arg_1
+         %27 = OpLoad %v3half %arg_0
+         %32 = OpCompositeConstruct %v3bool %25 %25 %25
+         %24 = OpSelect %v3half %32 %26 %27
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %select_1ada2a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %select_1ada2a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %select_1ada2a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.wgsl
new file mode 100644
index 0000000..89e258c
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn select_1ada2a() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = true;
+  var res : vec3<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/53d518.wgsl b/test/tint/builtins/gen/var/select/53d518.wgsl
new file mode 100644
index 0000000..9f43aa8
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<bool>(true);
+  var res: vec3<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/53d518.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a04ba39
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void select_53d518() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  bool3 arg_2 = (true).xxx;
+  vector<float16_t, 3> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/53d518.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..41ea9bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void select_53d518() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  bool3 arg_2 = (true).xxx;
+  vector<float16_t, 3> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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@0x000001B5EE857E30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.glsl
new file mode 100644
index 0000000..496678a
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_53d518() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  bvec3 arg_2 = bvec3(true);
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  bvec3 arg_2 = bvec3(true);
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  bvec3 arg_2 = bvec3(true);
+  f16vec3 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/select/53d518.wgsl.expected.msl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.msl
new file mode 100644
index 0000000..cc5db04
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_53d518() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  bool3 arg_2 = bool3(true);
+  half3 res = select(arg_0, arg_1, arg_2);
+}
+
+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/var/select/53d518.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.spvasm
new file mode 100644
index 0000000..e2bd1a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+       %true = OpConstantTrue %bool
+         %22 = OpConstantComposite %v3bool %true %true %true
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+         %25 = OpConstantNull %v3bool
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_53d518 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v3bool Function %25
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %22
+         %27 = OpLoad %v3bool %arg_2
+         %28 = OpLoad %v3half %arg_1
+         %29 = OpLoad %v3half %arg_0
+         %26 = OpSelect %v3half %27 %28 %29
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %select_53d518
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %select_53d518
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %select_53d518
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.wgsl
new file mode 100644
index 0000000..8c40bca
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn select_53d518() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<bool>(true);
+  var res : vec3<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/830dd9.wgsl b/test/tint/builtins/gen/var/select/830dd9.wgsl
new file mode 100644
index 0000000..596c536
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = true;
+  var res: vec4<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/830dd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6cf31e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void select_830dd9() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  bool arg_2 = true;
+  vector<float16_t, 4> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/830dd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..844a4b7
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void select_830dd9() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  bool arg_2 = true;
+  vector<float16_t, 4> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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@0x000002476DF13A60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.glsl
new file mode 100644
index 0000000..76d5e54
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_830dd9() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  bool arg_2 = true;
+  f16vec4 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  bool arg_2 = true;
+  f16vec4 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  bool arg_2 = true;
+  f16vec4 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/830dd9.wgsl.expected.msl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.msl
new file mode 100644
index 0000000..e9b5d67
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_830dd9() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  bool arg_2 = true;
+  half4 res = select(arg_0, arg_1, arg_2);
+}
+
+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/var/select/830dd9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.spvasm
new file mode 100644
index 0000000..c099ce9
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %23 = OpConstantNull %bool
+     %v4bool = OpTypeVector %bool 4
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+         %31 = OpConstantNull %v4bool
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_830dd9 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_bool Function %23
+         %29 = OpVariable %_ptr_Function_v4bool Function %31
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %true
+         %25 = OpLoad %bool %arg_2
+         %26 = OpLoad %v4half %arg_1
+         %27 = OpLoad %v4half %arg_0
+         %32 = OpCompositeConstruct %v4bool %25 %25 %25 %25
+         %24 = OpSelect %v4half %32 %26 %27
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %select_830dd9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %select_830dd9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %select_830dd9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.wgsl
new file mode 100644
index 0000000..d1a0be6
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn select_830dd9() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = true;
+  var res : vec4<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/86f9bd.wgsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl
new file mode 100644
index 0000000..fcf7755
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = true;
+  var res: vec2<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/86f9bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b0d16c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void select_86f9bd() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  bool arg_2 = true;
+  vector<float16_t, 2> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/86f9bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..341d518
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void select_86f9bd() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  bool arg_2 = true;
+  vector<float16_t, 2> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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@0x0000018386C13370(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.glsl
new file mode 100644
index 0000000..6217049
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_86f9bd() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  bool arg_2 = true;
+  f16vec2 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  bool arg_2 = true;
+  f16vec2 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  bool arg_2 = true;
+  f16vec2 res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/86f9bd.wgsl.expected.msl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.msl
new file mode 100644
index 0000000..1ff9477
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_86f9bd() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  bool arg_2 = true;
+  half2 res = select(arg_0, arg_1, arg_2);
+}
+
+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/var/select/86f9bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.spvasm
new file mode 100644
index 0000000..cfb8b98
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+%_ptr_Function_bool = OpTypePointer Function %bool
+         %23 = OpConstantNull %bool
+     %v2bool = OpTypeVector %bool 2
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+         %31 = OpConstantNull %v2bool
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_86f9bd = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_bool Function %23
+         %29 = OpVariable %_ptr_Function_v2bool Function %31
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %true
+         %25 = OpLoad %bool %arg_2
+         %26 = OpLoad %v2half %arg_1
+         %27 = OpLoad %v2half %arg_0
+         %32 = OpCompositeConstruct %v2bool %25 %25
+         %24 = OpSelect %v2half %32 %26 %27
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %select_86f9bd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %select_86f9bd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %select_86f9bd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd73ed0
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn select_86f9bd() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = true;
+  var res : vec2<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/a081f1.wgsl b/test/tint/builtins/gen/var/select/a081f1.wgsl
new file mode 100644
index 0000000..713d3c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<bool>(true);
+  var res: vec4<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/a081f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..abae0c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void select_a081f1() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  bool4 arg_2 = (true).xxxx;
+  vector<float16_t, 4> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/a081f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9ac9d28
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void select_a081f1() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  bool4 arg_2 = (true).xxxx;
+  vector<float16_t, 4> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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@0x000002045A0049A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.glsl
new file mode 100644
index 0000000..4d8e8c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_a081f1() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  bvec4 arg_2 = bvec4(true);
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  bvec4 arg_2 = bvec4(true);
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  bvec4 arg_2 = bvec4(true);
+  f16vec4 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/select/a081f1.wgsl.expected.msl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.msl
new file mode 100644
index 0000000..4fcb8d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_a081f1() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  bool4 arg_2 = bool4(true);
+  half4 res = select(arg_0, arg_1, arg_2);
+}
+
+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/var/select/a081f1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.spvasm
new file mode 100644
index 0000000..35b71ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+       %true = OpConstantTrue %bool
+         %22 = OpConstantComposite %v4bool %true %true %true %true
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+         %25 = OpConstantNull %v4bool
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_a081f1 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v4bool Function %25
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %22
+         %27 = OpLoad %v4bool %arg_2
+         %28 = OpLoad %v4half %arg_1
+         %29 = OpLoad %v4half %arg_0
+         %26 = OpSelect %v4half %27 %28 %29
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %select_a081f1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %select_a081f1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %select_a081f1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.wgsl
new file mode 100644
index 0000000..2e86702
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn select_a081f1() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<bool>(true);
+  var res : vec4<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/ed7c13.wgsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl
new file mode 100644
index 0000000..43274f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<bool>(true);
+  var res: vec2<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/select/ed7c13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..636eebe
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void select_ed7c13() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  bool2 arg_2 = (true).xx;
+  vector<float16_t, 2> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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/var/select/ed7c13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..89935f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
@@ -0,0 +1,40 @@
+SKIP: FAILED
+
+void select_ed7c13() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  bool2 arg_2 = (true).xx;
+  vector<float16_t, 2> res = (arg_2 ? arg_1 : arg_0);
+}
+
+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@0x000002503B521520(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.glsl
new file mode 100644
index 0000000..5dbf4af
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_ed7c13() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  bvec2 arg_2 = bvec2(true);
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  bvec2 arg_2 = bvec2(true);
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  bvec2 arg_2 = bvec2(true);
+  f16vec2 res = mix(arg_0, arg_1, arg_2);
+}
+
+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/var/select/ed7c13.wgsl.expected.msl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.msl
new file mode 100644
index 0000000..415a065
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_ed7c13() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  bool2 arg_2 = bool2(true);
+  half2 res = select(arg_0, arg_1, arg_2);
+}
+
+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/var/select/ed7c13.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc159cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+       %true = OpConstantTrue %bool
+         %22 = OpConstantComposite %v2bool %true %true
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+         %25 = OpConstantNull %v2bool
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_ed7c13 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v2bool Function %25
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %22
+         %27 = OpLoad %v2bool %arg_2
+         %28 = OpLoad %v2half %arg_1
+         %29 = OpLoad %v2half %arg_0
+         %26 = OpSelect %v2half %27 %28 %29
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %select_ed7c13
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %select_ed7c13
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %select_ed7c13
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.wgsl
new file mode 100644
index 0000000..67b7d82
--- /dev/null
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn select_ed7c13() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<bool>(true);
+  var res : vec2<f16> = select(arg_0, arg_1, arg_2);
+}
+
+@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/var/sign/160933.wgsl b/test/tint/builtins/gen/var/sign/160933.wgsl
new file mode 100644
index 0000000..3bd21d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = sign(arg_0);
+}
+
+@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/var/sign/160933.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5800ea0
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sign_160933() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sign(arg_0);
+}
+
+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/var/sign/160933.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..15614dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sign_160933() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sign(arg_0);
+}
+
+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@0x000001D74F9AEFE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D74F9AEFE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.glsl
new file mode 100644
index 0000000..34a1538
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_160933() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sign(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sign(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sign(arg_0);
+}
+
+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/var/sign/160933.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.msl
new file mode 100644
index 0000000..6e7de9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_160933() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = sign(arg_0);
+}
+
+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/var/sign/160933.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.spvasm
new file mode 100644
index 0000000..b1d1b7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sign_160933 "sign_160933"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_160933 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 FSign %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sign_160933
+               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 %sign_160933
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sign_160933
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.wgsl
new file mode 100644
index 0000000..21ab9a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sign_160933() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = sign(arg_0);
+}
+
+@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/var/sign/5d283a.wgsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl
new file mode 100644
index 0000000..0855f79
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = sign(arg_0);
+}
+
+@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/var/sign/5d283a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0f9a2c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sign_5d283a() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sign(arg_0);
+}
+
+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/var/sign/5d283a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0f5e127
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sign_5d283a() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sign(arg_0);
+}
+
+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@0x0000025242B02410(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025242B02410(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.glsl
new file mode 100644
index 0000000..bb557c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_5d283a() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sign(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sign(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sign(arg_0);
+}
+
+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/var/sign/5d283a.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.msl
new file mode 100644
index 0000000..06a5e9e
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_5d283a() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = sign(arg_0);
+}
+
+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/var/sign/5d283a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.spvasm
new file mode 100644
index 0000000..a65dfc1
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sign_5d283a "sign_5d283a"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_5d283a = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 FSign %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sign_5d283a
+               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 %sign_5d283a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sign_5d283a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.wgsl
new file mode 100644
index 0000000..78cd550
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sign_5d283a() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = sign(arg_0);
+}
+
+@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/var/sign/7c85ea.wgsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl
new file mode 100644
index 0000000..55bb282
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = sign(arg_0);
+}
+
+@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/var/sign/7c85ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..159140c
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sign_7c85ea() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sign(arg_0);
+}
+
+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/var/sign/7c85ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f270ceb
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sign_7c85ea() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sign(arg_0);
+}
+
+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@0x0000025B195644F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025B195644F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.glsl
new file mode 100644
index 0000000..35b29e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_7c85ea() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = sign(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sign(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sign(arg_0);
+}
+
+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/var/sign/7c85ea.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.msl
new file mode 100644
index 0000000..649103c
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_7c85ea() {
+  half arg_0 = 0.0h;
+  half res = sign(arg_0);
+}
+
+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/var/sign/7c85ea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.spvasm
new file mode 100644
index 0000000..81d4f68
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_7c85ea = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 FSign %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %sign_7c85ea
+               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 %sign_7c85ea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %sign_7c85ea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d5dd3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sign_7c85ea() {
+  var arg_0 = f16();
+  var res : f16 = sign(arg_0);
+}
+
+@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/var/sign/ccdb3c.wgsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl
new file mode 100644
index 0000000..9796e60
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = sign(arg_0);
+}
+
+@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/var/sign/ccdb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6968272
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sign_ccdb3c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sign(arg_0);
+}
+
+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/var/sign/ccdb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2756198
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sign_ccdb3c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sign(arg_0);
+}
+
+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@0x0000027F56D505E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F56D505E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.glsl
new file mode 100644
index 0000000..7cd2e5c
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_ccdb3c() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sign(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sign(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sign(arg_0);
+}
+
+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/var/sign/ccdb3c.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.msl
new file mode 100644
index 0000000..479a00a
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_ccdb3c() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = sign(arg_0);
+}
+
+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/var/sign/ccdb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.spvasm
new file mode 100644
index 0000000..3d7d8e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sign_ccdb3c "sign_ccdb3c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_ccdb3c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 FSign %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sign_ccdb3c
+               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 %sign_ccdb3c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sign_ccdb3c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.wgsl
new file mode 100644
index 0000000..71231dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sign_ccdb3c() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = sign(arg_0);
+}
+
+@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/var/sin/2c903b.wgsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl
new file mode 100644
index 0000000..d639f9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = sin(arg_0);
+}
+
+@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/var/sin/2c903b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f4f1c6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sin_2c903b() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sin(arg_0);
+}
+
+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/var/sin/2c903b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..06f82a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sin_2c903b() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sin(arg_0);
+}
+
+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@0x0000022899018770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022899018770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl
new file mode 100644
index 0000000..8af8af0
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_2c903b() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sin(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sin(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sin(arg_0);
+}
+
+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/var/sin/2c903b.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl
new file mode 100644
index 0000000..726be54
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_2c903b() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = sin(arg_0);
+}
+
+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/var/sin/2c903b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6340ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sin_2c903b "sin_2c903b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_2c903b = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Sin %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sin_2c903b
+               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 %sin_2c903b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sin_2c903b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl
new file mode 100644
index 0000000..7e8f70a
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sin_2c903b() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = sin(arg_0);
+}
+
+@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/var/sin/3cca11.wgsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl
new file mode 100644
index 0000000..fcc4f9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = sin(arg_0);
+}
+
+@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/var/sin/3cca11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..52c96ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sin_3cca11() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sin(arg_0);
+}
+
+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/var/sin/3cca11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8ea97b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sin_3cca11() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sin(arg_0);
+}
+
+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@0x000001FCDD1705E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FCDD1705E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl
new file mode 100644
index 0000000..75cdcaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_3cca11() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sin(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sin(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sin(arg_0);
+}
+
+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/var/sin/3cca11.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl
new file mode 100644
index 0000000..5dbd595
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_3cca11() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = sin(arg_0);
+}
+
+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/var/sin/3cca11.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm
new file mode 100644
index 0000000..969ca21
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sin_3cca11 "sin_3cca11"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_3cca11 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Sin %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sin_3cca11
+               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 %sin_3cca11
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sin_3cca11
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl
new file mode 100644
index 0000000..34f865d
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sin_3cca11() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = sin(arg_0);
+}
+
+@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/var/sin/5c0712.wgsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl
new file mode 100644
index 0000000..e94e831
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = sin(arg_0);
+}
+
+@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/var/sin/5c0712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..38a4cca
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sin_5c0712() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sin(arg_0);
+}
+
+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/var/sin/5c0712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cf3f4d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sin_5c0712() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sin(arg_0);
+}
+
+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@0x00000260A64A2B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000260A64A2B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl
new file mode 100644
index 0000000..2260625
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_5c0712() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sin(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sin(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sin(arg_0);
+}
+
+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/var/sin/5c0712.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl
new file mode 100644
index 0000000..87f6df6
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_5c0712() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = sin(arg_0);
+}
+
+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/var/sin/5c0712.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm
new file mode 100644
index 0000000..07ac809
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sin_5c0712 "sin_5c0712"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_5c0712 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Sin %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sin_5c0712
+               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 %sin_5c0712
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sin_5c0712
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl
new file mode 100644
index 0000000..d737c45
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sin_5c0712() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = sin(arg_0);
+}
+
+@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/var/sin/66a59f.wgsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl
new file mode 100644
index 0000000..d73f364
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = sin(arg_0);
+}
+
+@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/var/sin/66a59f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b1237f
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sin_66a59f() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sin(arg_0);
+}
+
+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/var/sin/66a59f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..40199e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sin_66a59f() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sin(arg_0);
+}
+
+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@0x000001826042C2F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001826042C2F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl
new file mode 100644
index 0000000..20ac57e
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_66a59f() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = sin(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sin(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sin(arg_0);
+}
+
+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/var/sin/66a59f.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl
new file mode 100644
index 0000000..1a71884
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_66a59f() {
+  half arg_0 = 0.0h;
+  half res = sin(arg_0);
+}
+
+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/var/sin/66a59f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm
new file mode 100644
index 0000000..f4689fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_66a59f = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Sin %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %sin_66a59f
+               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 %sin_66a59f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %sin_66a59f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl
new file mode 100644
index 0000000..897e30d
--- /dev/null
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sin_66a59f() {
+  var arg_0 = f16();
+  var res : f16 = sin(arg_0);
+}
+
+@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/var/sinh/0908c1.wgsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl
new file mode 100644
index 0000000..13e6f98
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = sinh(arg_0);
+}
+
+@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/var/sinh/0908c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..80c43ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sinh_0908c1() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sinh(arg_0);
+}
+
+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/var/sinh/0908c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..218f8d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sinh_0908c1() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sinh(arg_0);
+}
+
+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@0x0000029A72348830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A72348830(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.glsl
new file mode 100644
index 0000000..5d2c159
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_0908c1() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sinh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sinh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sinh(arg_0);
+}
+
+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/var/sinh/0908c1.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.msl
new file mode 100644
index 0000000..a31c760
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_0908c1() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = sinh(arg_0);
+}
+
+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/var/sinh/0908c1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.spvasm
new file mode 100644
index 0000000..5d347fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sinh_0908c1 "sinh_0908c1"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_0908c1 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Sinh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sinh_0908c1
+               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 %sinh_0908c1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sinh_0908c1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.wgsl
new file mode 100644
index 0000000..e077d31
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sinh_0908c1() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = sinh(arg_0);
+}
+
+@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/var/sinh/69cce2.wgsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl
new file mode 100644
index 0000000..77fa301
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = sinh(arg_0);
+}
+
+@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/var/sinh/69cce2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4a09bf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sinh_69cce2() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sinh(arg_0);
+}
+
+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/var/sinh/69cce2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7029997
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sinh_69cce2() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sinh(arg_0);
+}
+
+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@0x000002177048C2F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002177048C2F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.glsl
new file mode 100644
index 0000000..62e7689
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_69cce2() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = sinh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sinh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sinh(arg_0);
+}
+
+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/var/sinh/69cce2.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.msl
new file mode 100644
index 0000000..8c10854
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_69cce2() {
+  half arg_0 = 0.0h;
+  half res = sinh(arg_0);
+}
+
+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/var/sinh/69cce2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.spvasm
new file mode 100644
index 0000000..b9a45ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_69cce2 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Sinh %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %sinh_69cce2
+               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 %sinh_69cce2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %sinh_69cce2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.wgsl
new file mode 100644
index 0000000..bb651b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sinh_69cce2() {
+  var arg_0 = f16();
+  var res : f16 = sinh(arg_0);
+}
+
+@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/var/sinh/924f19.wgsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl
new file mode 100644
index 0000000..5afb8cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = sinh(arg_0);
+}
+
+@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/var/sinh/924f19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dd95c74
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sinh_924f19() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sinh(arg_0);
+}
+
+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/var/sinh/924f19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..65bd9a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sinh_924f19() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sinh(arg_0);
+}
+
+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@0x0000023F87A98990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023F87A98990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.glsl
new file mode 100644
index 0000000..46efc04
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_924f19() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sinh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sinh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sinh(arg_0);
+}
+
+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/var/sinh/924f19.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.msl
new file mode 100644
index 0000000..eb99e96
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_924f19() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = sinh(arg_0);
+}
+
+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/var/sinh/924f19.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.spvasm
new file mode 100644
index 0000000..c1a335d
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sinh_924f19 "sinh_924f19"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_924f19 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Sinh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sinh_924f19
+               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 %sinh_924f19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sinh_924f19
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.wgsl
new file mode 100644
index 0000000..e6d1440
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sinh_924f19() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = sinh(arg_0);
+}
+
+@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/var/sinh/ba7e25.wgsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl
new file mode 100644
index 0000000..ea5e54c
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = sinh(arg_0);
+}
+
+@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/var/sinh/ba7e25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d40f726
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sinh_ba7e25() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sinh(arg_0);
+}
+
+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/var/sinh/ba7e25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d013e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sinh_ba7e25() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sinh(arg_0);
+}
+
+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@0x000001CF8F9907F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CF8F9907F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.glsl
new file mode 100644
index 0000000..c1e6fe6
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_ba7e25() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sinh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sinh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sinh(arg_0);
+}
+
+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/var/sinh/ba7e25.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.msl
new file mode 100644
index 0000000..c211bfd
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_ba7e25() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = sinh(arg_0);
+}
+
+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/var/sinh/ba7e25.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.spvasm
new file mode 100644
index 0000000..d98c76f
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sinh_ba7e25 "sinh_ba7e25"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_ba7e25 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Sinh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sinh_ba7e25
+               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 %sinh_ba7e25
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sinh_ba7e25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.wgsl
new file mode 100644
index 0000000..4fdc050
--- /dev/null
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sinh_ba7e25() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = sinh(arg_0);
+}
+
+@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/var/smoothstep/12c031.wgsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl
new file mode 100644
index 0000000..630ba4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res: vec2<f16> = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/smoothstep/12c031.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9be0898
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void smoothstep_12c031() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/12c031.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8bc9391
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void smoothstep_12c031() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_2 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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@0x000001E666F5FB00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.glsl
new file mode 100644
index 0000000..c5453ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_12c031() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 arg_2 = f16vec2(0.0hf);
+  f16vec2 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/12c031.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.msl
new file mode 100644
index 0000000..d21672c
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_12c031() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 arg_2 = half2(0.0h);
+  half2 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/12c031.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.spvasm
new file mode 100644
index 0000000..658663c
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_12c031 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v2half %arg_0
+         %23 = OpLoad %v2half %arg_1
+         %24 = OpLoad %v2half %arg_2
+         %20 = OpExtInst %v2half %21 SmoothStep %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %smoothstep_12c031
+               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 %smoothstep_12c031
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %smoothstep_12c031
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.wgsl
new file mode 100644
index 0000000..771f83c
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn smoothstep_12c031() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var arg_2 = vec2<f16>(f16());
+  var res : vec2<f16> = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/smoothstep/586e12.wgsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl
new file mode 100644
index 0000000..55d7962
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res: f16 = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/smoothstep/586e12.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3dd35eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void smoothstep_586e12() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/586e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e740197
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void smoothstep_586e12() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t arg_2 = float16_t(0.0h);
+  float16_t res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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@0x000001CA5325EE80(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CA5325EE80(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.glsl
new file mode 100644
index 0000000..4aca82e
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_586e12() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t arg_2 = 0.0hf;
+  float16_t res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/586e12.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.msl
new file mode 100644
index 0000000..5b62341
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_586e12() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half arg_2 = 0.0h;
+  half res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/586e12.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.spvasm
new file mode 100644
index 0000000..dc12c46
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %smoothstep_586e12 "smoothstep_586e12"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_586e12 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+      %arg_2 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+               OpStore %arg_2 %14
+         %21 = OpLoad %half %arg_0
+         %22 = OpLoad %half %arg_1
+         %23 = OpLoad %half %arg_2
+         %19 = OpExtInst %half %20 SmoothStep %21 %22 %23
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %smoothstep_586e12
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %smoothstep_586e12
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %smoothstep_586e12
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.wgsl
new file mode 100644
index 0000000..9967bf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn smoothstep_586e12() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var arg_2 = f16();
+  var res : f16 = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/smoothstep/6e7a74.wgsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl
new file mode 100644
index 0000000..fbade6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res: vec3<f16> = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/smoothstep/6e7a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..710439c
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void smoothstep_6e7a74() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd99645
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void smoothstep_6e7a74() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_2 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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@0x0000018E52AF3660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.glsl
new file mode 100644
index 0000000..f1ecbb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_6e7a74() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 arg_2 = f16vec3(0.0hf);
+  f16vec3 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/6e7a74.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.msl
new file mode 100644
index 0000000..ac08ba8
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_6e7a74() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 arg_2 = half3(0.0h);
+  half3 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/6e7a74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.spvasm
new file mode 100644
index 0000000..d4fa576
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_6e7a74 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v3half %arg_0
+         %23 = OpLoad %v3half %arg_1
+         %24 = OpLoad %v3half %arg_2
+         %20 = OpExtInst %v3half %21 SmoothStep %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %smoothstep_6e7a74
+               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 %smoothstep_6e7a74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %smoothstep_6e7a74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.wgsl
new file mode 100644
index 0000000..7e668eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn smoothstep_6e7a74() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var arg_2 = vec3<f16>(f16());
+  var res : vec3<f16> = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/smoothstep/c43ebd.wgsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl
new file mode 100644
index 0000000..b9a0caf
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl
@@ -0,0 +1,48 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res: vec4<f16> = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/smoothstep/c43ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3bd807d
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+void smoothstep_c43ebd() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dcf7052
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,41 @@
+SKIP: FAILED
+
+void smoothstep_c43ebd() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_2 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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@0x000001EE5BEB1170(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.glsl
new file mode 100644
index 0000000..66c3b74
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_c43ebd() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 arg_2 = f16vec4(0.0hf);
+  f16vec4 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/c43ebd.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.msl
new file mode 100644
index 0000000..317c043
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_c43ebd() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 arg_2 = half4(0.0h);
+  half4 res = smoothstep(arg_0, arg_1, arg_2);
+}
+
+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/var/smoothstep/c43ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.spvasm
new file mode 100644
index 0000000..af5f1b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %21 = 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 %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_c43ebd = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_2 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+               OpStore %arg_2 %15
+         %22 = OpLoad %v4half %arg_0
+         %23 = OpLoad %v4half %arg_1
+         %24 = OpLoad %v4half %arg_2
+         %20 = OpExtInst %v4half %21 SmoothStep %22 %23 %24
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %smoothstep_c43ebd
+               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 %smoothstep_c43ebd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %smoothstep_c43ebd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.wgsl
new file mode 100644
index 0000000..bb68100
--- /dev/null
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+enable f16;
+
+fn smoothstep_c43ebd() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var arg_2 = vec4<f16>(f16());
+  var res : vec4<f16> = smoothstep(arg_0, arg_1, arg_2);
+}
+
+@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/var/sqrt/803d1c.wgsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl
new file mode 100644
index 0000000..3911393
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = sqrt(arg_0);
+}
+
+@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/var/sqrt/803d1c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..58428a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sqrt_803d1c() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sqrt(arg_0);
+}
+
+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/var/sqrt/803d1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..888036e
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sqrt_803d1c() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = sqrt(arg_0);
+}
+
+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@0x0000017B75EA30C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017B75EA30C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.glsl
new file mode 100644
index 0000000..fe15cf8
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_803d1c() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sqrt(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sqrt(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = sqrt(arg_0);
+}
+
+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/var/sqrt/803d1c.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.msl
new file mode 100644
index 0000000..f05f55f
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_803d1c() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = sqrt(arg_0);
+}
+
+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/var/sqrt/803d1c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.spvasm
new file mode 100644
index 0000000..4424826
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sqrt_803d1c "sqrt_803d1c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_803d1c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Sqrt %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sqrt_803d1c
+               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 %sqrt_803d1c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sqrt_803d1c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c83594
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sqrt_803d1c() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = sqrt(arg_0);
+}
+
+@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/var/sqrt/895a0c.wgsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl
new file mode 100644
index 0000000..9b4b318
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = sqrt(arg_0);
+}
+
+@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/var/sqrt/895a0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f22d812
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sqrt_895a0c() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sqrt(arg_0);
+}
+
+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/var/sqrt/895a0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68388d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sqrt_895a0c() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = sqrt(arg_0);
+}
+
+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@0x00000173DFA01300(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000173DFA01300(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.glsl
new file mode 100644
index 0000000..d8f2fbd
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_895a0c() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sqrt(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sqrt(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = sqrt(arg_0);
+}
+
+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/var/sqrt/895a0c.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.msl
new file mode 100644
index 0000000..5a04cb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_895a0c() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = sqrt(arg_0);
+}
+
+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/var/sqrt/895a0c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.spvasm
new file mode 100644
index 0000000..e2fbf41
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sqrt_895a0c "sqrt_895a0c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_895a0c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Sqrt %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sqrt_895a0c
+               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 %sqrt_895a0c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sqrt_895a0c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.wgsl
new file mode 100644
index 0000000..98a857e
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sqrt_895a0c() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = sqrt(arg_0);
+}
+
+@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/var/sqrt/d9ab4d.wgsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl
new file mode 100644
index 0000000..4be2cc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = sqrt(arg_0);
+}
+
+@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/var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..472d31d
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sqrt_d9ab4d() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sqrt(arg_0);
+}
+
+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/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2dae4c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sqrt_d9ab4d() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = sqrt(arg_0);
+}
+
+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@0x00000261E9DA1200(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261E9DA1200(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.glsl
new file mode 100644
index 0000000..3cf2d1d
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_d9ab4d() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sqrt(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sqrt(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = sqrt(arg_0);
+}
+
+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/var/sqrt/d9ab4d.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.msl
new file mode 100644
index 0000000..39f7f69
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_d9ab4d() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = sqrt(arg_0);
+}
+
+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/var/sqrt/d9ab4d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.spvasm
new file mode 100644
index 0000000..d02e8cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %sqrt_d9ab4d "sqrt_d9ab4d"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_d9ab4d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Sqrt %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %sqrt_d9ab4d
+               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 %sqrt_d9ab4d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %sqrt_d9ab4d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.wgsl
new file mode 100644
index 0000000..cd6f05c
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sqrt_d9ab4d() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = sqrt(arg_0);
+}
+
+@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/var/sqrt/ec33e9.wgsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl
new file mode 100644
index 0000000..7a82540
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = sqrt(arg_0);
+}
+
+@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/var/sqrt/ec33e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a0b3d5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void sqrt_ec33e9() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sqrt(arg_0);
+}
+
+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/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a31e13
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void sqrt_ec33e9() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = sqrt(arg_0);
+}
+
+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@0x000002A68F39AB60(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A68F39AB60(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.glsl
new file mode 100644
index 0000000..5cb1a66
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_ec33e9() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = sqrt(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sqrt(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = sqrt(arg_0);
+}
+
+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/var/sqrt/ec33e9.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.msl
new file mode 100644
index 0000000..8f4e72e
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_ec33e9() {
+  half arg_0 = 0.0h;
+  half res = sqrt(arg_0);
+}
+
+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/var/sqrt/ec33e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..c593ece
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_ec33e9 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Sqrt %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %sqrt_ec33e9
+               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 %sqrt_ec33e9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %sqrt_ec33e9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..af947c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn sqrt_ec33e9() {
+  var arg_0 = f16();
+  var res : f16 = sqrt(arg_0);
+}
+
+@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/var/step/07cb06.wgsl b/test/tint/builtins/gen/var/step/07cb06.wgsl
new file mode 100644
index 0000000..a85442c
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res: vec2<f16> = step(arg_0, arg_1);
+}
+
+@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/var/step/07cb06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..58b3876
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void step_07cb06() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = step(arg_0, arg_1);
+}
+
+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/var/step/07cb06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f643e8f
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void step_07cb06() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> arg_1 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = step(arg_0, arg_1);
+}
+
+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@0x0000026FD2EC2DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.glsl
new file mode 100644
index 0000000..028ea1c
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_07cb06() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = step(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = step(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 arg_1 = f16vec2(0.0hf);
+  f16vec2 res = step(arg_0, arg_1);
+}
+
+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/var/step/07cb06.wgsl.expected.msl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.msl
new file mode 100644
index 0000000..e831f91
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_07cb06() {
+  half2 arg_0 = half2(0.0h);
+  half2 arg_1 = half2(0.0h);
+  half2 res = step(arg_0, arg_1);
+}
+
+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/var/step/07cb06.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.spvasm
new file mode 100644
index 0000000..17f336a
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %step_07cb06 "step_07cb06"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_07cb06 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v2half %arg_0
+         %22 = OpLoad %v2half %arg_1
+         %19 = OpExtInst %v2half %20 Step %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %step_07cb06
+               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 %step_07cb06
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %step_07cb06
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.wgsl
new file mode 100644
index 0000000..373395d
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn step_07cb06() {
+  var arg_0 = vec2<f16>(f16());
+  var arg_1 = vec2<f16>(f16());
+  var res : vec2<f16> = step(arg_0, arg_1);
+}
+
+@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/var/step/630d07.wgsl b/test/tint/builtins/gen/var/step/630d07.wgsl
new file mode 100644
index 0000000..7b19969
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = f16();
+  var arg_1 = f16();
+  var res: f16 = step(arg_0, arg_1);
+}
+
+@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/var/step/630d07.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..12473df
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void step_630d07() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = step(arg_0, arg_1);
+}
+
+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/var/step/630d07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1d7db44
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+SKIP: FAILED
+
+void step_630d07() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t arg_1 = float16_t(0.0h);
+  float16_t res = step(arg_0, arg_1);
+}
+
+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@0x0000024979951900(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024979951900(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.glsl
new file mode 100644
index 0000000..a937e6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_630d07() {
+  float16_t arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = step(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = step(arg_0, arg_1);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t arg_1 = 0.0hf;
+  float16_t res = step(arg_0, arg_1);
+}
+
+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/var/step/630d07.wgsl.expected.msl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.msl
new file mode 100644
index 0000000..7367608
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_630d07() {
+  half arg_0 = 0.0h;
+  half arg_1 = 0.0h;
+  half res = step(arg_0, arg_1);
+}
+
+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/var/step/630d07.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.spvasm
new file mode 100644
index 0000000..4ec1055
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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 %step_630d07 "step_630d07"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_630d07 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+      %arg_1 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+               OpStore %arg_1 %14
+         %20 = OpLoad %half %arg_0
+         %21 = OpLoad %half %arg_1
+         %18 = OpExtInst %half %19 Step %20 %21
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %step_630d07
+               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 %step_630d07
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %step_630d07
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.wgsl
new file mode 100644
index 0000000..fb6884c
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn step_630d07() {
+  var arg_0 = f16();
+  var arg_1 = f16();
+  var res : f16 = step(arg_0, arg_1);
+}
+
+@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/var/step/baa320.wgsl b/test/tint/builtins/gen/var/step/baa320.wgsl
new file mode 100644
index 0000000..48a8fe6
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res: vec4<f16> = step(arg_0, arg_1);
+}
+
+@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/var/step/baa320.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..11ad998
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void step_baa320() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = step(arg_0, arg_1);
+}
+
+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/var/step/baa320.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7bae936
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void step_baa320() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> arg_1 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = step(arg_0, arg_1);
+}
+
+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@0x000001DD0BA42C40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.glsl
new file mode 100644
index 0000000..6ac70df
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_baa320() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = step(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = step(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 arg_1 = f16vec4(0.0hf);
+  f16vec4 res = step(arg_0, arg_1);
+}
+
+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/var/step/baa320.wgsl.expected.msl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.msl
new file mode 100644
index 0000000..e0841af
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_baa320() {
+  half4 arg_0 = half4(0.0h);
+  half4 arg_1 = half4(0.0h);
+  half4 res = step(arg_0, arg_1);
+}
+
+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/var/step/baa320.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.spvasm
new file mode 100644
index 0000000..57e7451
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %step_baa320 "step_baa320"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_baa320 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v4half %arg_0
+         %22 = OpLoad %v4half %arg_1
+         %19 = OpExtInst %v4half %20 Step %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %step_baa320
+               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 %step_baa320
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %step_baa320
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.wgsl
new file mode 100644
index 0000000..6128002
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn step_baa320() {
+  var arg_0 = vec4<f16>(f16());
+  var arg_1 = vec4<f16>(f16());
+  var res : vec4<f16> = step(arg_0, arg_1);
+}
+
+@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/var/step/cc6b61.wgsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl
new file mode 100644
index 0000000..7b954e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl
@@ -0,0 +1,47 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res: vec3<f16> = step(arg_0, arg_1);
+}
+
+@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/var/step/cc6b61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..47f0c73
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+void step_cc6b61() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = step(arg_0, arg_1);
+}
+
+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/var/step/cc6b61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..285ad21
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+void step_cc6b61() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> arg_1 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = step(arg_0, arg_1);
+}
+
+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@0x0000013865172DA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.glsl
new file mode 100644
index 0000000..6b1be2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_cc6b61() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = step(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = step(arg_0, arg_1);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 arg_1 = f16vec3(0.0hf);
+  f16vec3 res = step(arg_0, arg_1);
+}
+
+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/var/step/cc6b61.wgsl.expected.msl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.msl
new file mode 100644
index 0000000..40defbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_cc6b61() {
+  half3 arg_0 = half3(0.0h);
+  half3 arg_1 = half3(0.0h);
+  half3 res = step(arg_0, arg_1);
+}
+
+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/var/step/cc6b61.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.spvasm
new file mode 100644
index 0000000..efbdfdc
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %step_cc6b61 "step_cc6b61"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_cc6b61 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+      %arg_1 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+               OpStore %arg_1 %15
+         %21 = OpLoad %v3half %arg_0
+         %22 = OpLoad %v3half %arg_1
+         %19 = OpExtInst %v3half %20 Step %21 %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %step_cc6b61
+               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 %step_cc6b61
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %step_cc6b61
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.wgsl
new file mode 100644
index 0000000..68bf827
--- /dev/null
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+enable f16;
+
+fn step_cc6b61() {
+  var arg_0 = vec3<f16>(f16());
+  var arg_1 = vec3<f16>(f16());
+  var res : vec3<f16> = step(arg_0, arg_1);
+}
+
+@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/var/tan/539e54.wgsl b/test/tint/builtins/gen/var/tan/539e54.wgsl
new file mode 100644
index 0000000..1b4dec5
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = tan(arg_0);
+}
+
+@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/var/tan/539e54.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5756588
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tan_539e54() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tan(arg_0);
+}
+
+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/var/tan/539e54.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c932938
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tan_539e54() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tan(arg_0);
+}
+
+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@0x000002AE30C0C880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE30C0C880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.glsl
new file mode 100644
index 0000000..7b8a22d
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_539e54() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tan(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tan(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tan(arg_0);
+}
+
+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/var/tan/539e54.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.msl
new file mode 100644
index 0000000..6c347d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_539e54() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = tan(arg_0);
+}
+
+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/var/tan/539e54.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.spvasm
new file mode 100644
index 0000000..3808f8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %tan_539e54 "tan_539e54"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_539e54 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Tan %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %tan_539e54
+               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 %tan_539e54
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %tan_539e54
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.wgsl
new file mode 100644
index 0000000..ceb00cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tan_539e54() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = tan(arg_0);
+}
+
+@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/var/tan/9f7c9c.wgsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl
new file mode 100644
index 0000000..812610e
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = tan(arg_0);
+}
+
+@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/var/tan/9f7c9c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2dc0ec5
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tan_9f7c9c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tan(arg_0);
+}
+
+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/var/tan/9f7c9c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bfffaf2
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tan_9f7c9c() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tan(arg_0);
+}
+
+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@0x0000013C12D4B340(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013C12D4B340(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.glsl
new file mode 100644
index 0000000..fa9d31e
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_9f7c9c() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tan(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tan(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tan(arg_0);
+}
+
+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/var/tan/9f7c9c.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.msl
new file mode 100644
index 0000000..5e66467
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_9f7c9c() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = tan(arg_0);
+}
+
+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/var/tan/9f7c9c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.spvasm
new file mode 100644
index 0000000..f4068ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %tan_9f7c9c "tan_9f7c9c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_9f7c9c = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Tan %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %tan_9f7c9c
+               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 %tan_9f7c9c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %tan_9f7c9c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.wgsl
new file mode 100644
index 0000000..87305cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tan_9f7c9c() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = tan(arg_0);
+}
+
+@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/var/tan/d4d491.wgsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl
new file mode 100644
index 0000000..3d3c9fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = tan(arg_0);
+}
+
+@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/var/tan/d4d491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fb9b0ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tan_d4d491() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tan(arg_0);
+}
+
+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/var/tan/d4d491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6df8e23
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tan_d4d491() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tan(arg_0);
+}
+
+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@0x0000026911B52E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026911B52E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.glsl
new file mode 100644
index 0000000..c826b6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_d4d491() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = tan(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tan(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tan(arg_0);
+}
+
+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/var/tan/d4d491.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.msl
new file mode 100644
index 0000000..792203e
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_d4d491() {
+  half arg_0 = 0.0h;
+  half res = tan(arg_0);
+}
+
+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/var/tan/d4d491.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.spvasm
new file mode 100644
index 0000000..e05388b
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_d4d491 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Tan %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %tan_d4d491
+               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 %tan_d4d491
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %tan_d4d491
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.wgsl
new file mode 100644
index 0000000..34abd8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tan_d4d491() {
+  var arg_0 = f16();
+  var res : f16 = tan(arg_0);
+}
+
+@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/var/tan/db0456.wgsl b/test/tint/builtins/gen/var/tan/db0456.wgsl
new file mode 100644
index 0000000..0277fd9
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = tan(arg_0);
+}
+
+@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/var/tan/db0456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b14a91a
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tan_db0456() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tan(arg_0);
+}
+
+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/var/tan/db0456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2c6f4b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tan_db0456() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tan(arg_0);
+}
+
+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@0x0000022CB9A7E270(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CB9A7E270(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.glsl
new file mode 100644
index 0000000..0698658
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_db0456() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tan(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tan(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tan(arg_0);
+}
+
+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/var/tan/db0456.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.msl
new file mode 100644
index 0000000..35e012d
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_db0456() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = tan(arg_0);
+}
+
+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/var/tan/db0456.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.spvasm
new file mode 100644
index 0000000..66a7ba7
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %tan_db0456 "tan_db0456"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_db0456 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Tan %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %tan_db0456
+               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 %tan_db0456
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %tan_db0456
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.wgsl
new file mode 100644
index 0000000..fb3a092
--- /dev/null
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tan_db0456() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = tan(arg_0);
+}
+
+@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/var/tanh/06a4fe.wgsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl
new file mode 100644
index 0000000..4c328b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = tanh(arg_0);
+}
+
+@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/var/tanh/06a4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..346965f
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tanh_06a4fe() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tanh(arg_0);
+}
+
+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/var/tanh/06a4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a8775d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tanh_06a4fe() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = tanh(arg_0);
+}
+
+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@0x0000028509F68770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028509F68770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.glsl
new file mode 100644
index 0000000..6d9857aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_06a4fe() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tanh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tanh(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = tanh(arg_0);
+}
+
+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/var/tanh/06a4fe.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.msl
new file mode 100644
index 0000000..3f2db87
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_06a4fe() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = tanh(arg_0);
+}
+
+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/var/tanh/06a4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..0a02492
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %tanh_06a4fe "tanh_06a4fe"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_06a4fe = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Tanh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %tanh_06a4fe
+               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 %tanh_06a4fe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %tanh_06a4fe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..8f73c44
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tanh_06a4fe() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = tanh(arg_0);
+}
+
+@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/var/tanh/5b19af.wgsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl
new file mode 100644
index 0000000..1b1cc79
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = tanh(arg_0);
+}
+
+@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/var/tanh/5b19af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..23e33a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tanh_5b19af() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tanh(arg_0);
+}
+
+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/var/tanh/5b19af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8c81022
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tanh_5b19af() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = tanh(arg_0);
+}
+
+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@0x000001A07EE64130(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A07EE64130(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.glsl
new file mode 100644
index 0000000..27503fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_5b19af() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = tanh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tanh(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = tanh(arg_0);
+}
+
+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/var/tanh/5b19af.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.msl
new file mode 100644
index 0000000..143fb98
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_5b19af() {
+  half arg_0 = 0.0h;
+  half res = tanh(arg_0);
+}
+
+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/var/tanh/5b19af.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.spvasm
new file mode 100644
index 0000000..9ea5007
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_5b19af = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Tanh %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %tanh_5b19af
+               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 %tanh_5b19af
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %tanh_5b19af
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.wgsl
new file mode 100644
index 0000000..b1f8363
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tanh_5b19af() {
+  var arg_0 = f16();
+  var res : f16 = tanh(arg_0);
+}
+
+@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/var/tanh/6d105a.wgsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl
new file mode 100644
index 0000000..08d3e6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = tanh(arg_0);
+}
+
+@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/var/tanh/6d105a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cb526b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tanh_6d105a() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tanh(arg_0);
+}
+
+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/var/tanh/6d105a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56aff70
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tanh_6d105a() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = tanh(arg_0);
+}
+
+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@0x0000022C76563400(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022C76563400(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.glsl
new file mode 100644
index 0000000..ab61ec7
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_6d105a() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tanh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tanh(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = tanh(arg_0);
+}
+
+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/var/tanh/6d105a.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.msl
new file mode 100644
index 0000000..1affd27
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_6d105a() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = tanh(arg_0);
+}
+
+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/var/tanh/6d105a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.spvasm
new file mode 100644
index 0000000..8fa93ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %tanh_6d105a "tanh_6d105a"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_6d105a = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Tanh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %tanh_6d105a
+               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 %tanh_6d105a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %tanh_6d105a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.wgsl
new file mode 100644
index 0000000..b638ef8
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tanh_6d105a() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = tanh(arg_0);
+}
+
+@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/var/tanh/e8efb3.wgsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl
new file mode 100644
index 0000000..8091075
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = tanh(arg_0);
+}
+
+@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/var/tanh/e8efb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..26cb7ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void tanh_e8efb3() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tanh(arg_0);
+}
+
+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/var/tanh/e8efb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4ce0631
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void tanh_e8efb3() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = tanh(arg_0);
+}
+
+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@0x0000020C348DBBA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C348DBBA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.glsl
new file mode 100644
index 0000000..1d866b6
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_e8efb3() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tanh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tanh(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = tanh(arg_0);
+}
+
+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/var/tanh/e8efb3.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.msl
new file mode 100644
index 0000000..0b5e6f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_e8efb3() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = tanh(arg_0);
+}
+
+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/var/tanh/e8efb3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.spvasm
new file mode 100644
index 0000000..8e07916
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %tanh_e8efb3 "tanh_e8efb3"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_e8efb3 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Tanh %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %tanh_e8efb3
+               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 %tanh_e8efb3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %tanh_e8efb3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.wgsl
new file mode 100644
index 0000000..bdb2905
--- /dev/null
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn tanh_e8efb3() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = tanh(arg_0);
+}
+
+@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/var/transpose/06794e.wgsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl
new file mode 100644
index 0000000..e17468f
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat3x3<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/06794e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cdd16a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_06794e() {
+  matrix<float16_t, 3, 3> arg_0 = matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+  matrix<float16_t, 3, 3> res = transpose(arg_0);
+}
+
+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/var/transpose/06794e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8e83264
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_06794e() {
+  matrix<float16_t, 3, 3> arg_0 = matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+  matrix<float16_t, 3, 3> res = transpose(arg_0);
+}
+
+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@0x00000166C5129750(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000166C5129750(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.glsl
new file mode 100644
index 0000000..558f547
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_06794e() {
+  f16mat3 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3 res = transpose(arg_0);
+}
+
+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 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3 res = transpose(arg_0);
+}
+
+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 arg_0 = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3 res = transpose(arg_0);
+}
+
+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/var/transpose/06794e.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.msl
new file mode 100644
index 0000000..bef8041
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_06794e() {
+  half3x3 arg_0 = half3x3(half3(0.0h), half3(0.0h), half3(0.0h));
+  half3x3 res = transpose(arg_0);
+}
+
+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/var/transpose/06794e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.spvasm
new file mode 100644
index 0000000..7817296
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat3v3half
+%_ptr_Function_mat3v3half = OpTypePointer Function %mat3v3half
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_06794e = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat3v3half Function %16
+        %res = OpVariable %_ptr_Function_mat3v3half Function %16
+               OpStore %arg_0 %16
+         %20 = OpLoad %mat3v3half %arg_0
+         %19 = OpTranspose %mat3v3half %20
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %transpose_06794e
+               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 %transpose_06794e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %transpose_06794e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.wgsl
new file mode 100644
index 0000000..500244d
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_06794e() {
+  var arg_0 = mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat3x3<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/5edd96.wgsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl
new file mode 100644
index 0000000..8bf22e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat4x2<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat2x4<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/5edd96.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5bfa600
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_5edd96() {
+  matrix<float16_t, 4, 2> arg_0 = 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);
+  matrix<float16_t, 2, 4> res = transpose(arg_0);
+}
+
+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/var/transpose/5edd96.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9874ab3
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_5edd96() {
+  matrix<float16_t, 4, 2> arg_0 = 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);
+  matrix<float16_t, 2, 4> res = transpose(arg_0);
+}
+
+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@0x000001F440374A40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F440374A40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.glsl
new file mode 100644
index 0000000..68629f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5edd96() {
+  f16mat4x2 arg_0 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2x4 res = transpose(arg_0);
+}
+
+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() {
+  f16mat4x2 arg_0 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2x4 res = transpose(arg_0);
+}
+
+void fragment_main() {
+  transpose_5edd96();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5edd96() {
+  f16mat4x2 arg_0 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2x4 res = transpose(arg_0);
+}
+
+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/var/transpose/5edd96.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.msl
new file mode 100644
index 0000000..c656586
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_5edd96() {
+  half4x2 arg_0 = half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h));
+  half2x4 res = transpose(arg_0);
+}
+
+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/var/transpose/5edd96.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.spvasm
new file mode 100644
index 0000000..a433092
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; 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 %transpose_5edd96 "transpose_5edd96"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat4v2half
+%_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half
+     %v4half = OpTypeVector %half 4
+ %mat2v4half = OpTypeMatrix %v4half 2
+%_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half
+         %25 = OpConstantNull %mat2v4half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_5edd96 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat4v2half Function %16
+        %res = OpVariable %_ptr_Function_mat2v4half Function %25
+               OpStore %arg_0 %16
+         %22 = OpLoad %mat4v2half %arg_0
+         %19 = OpTranspose %mat2v4half %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %transpose_5edd96
+               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 %transpose_5edd96
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %transpose_5edd96
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c293d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_5edd96() {
+  var arg_0 = mat4x2<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat2x4<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/5f36bf.wgsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl
new file mode 100644
index 0000000..7dfb05c
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat4x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat3x4<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/5f36bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6f424bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_5f36bf() {
+  matrix<float16_t, 4, 3> arg_0 = 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);
+  matrix<float16_t, 3, 4> res = transpose(arg_0);
+}
+
+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/var/transpose/5f36bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cfb38a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_5f36bf() {
+  matrix<float16_t, 4, 3> arg_0 = 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);
+  matrix<float16_t, 3, 4> res = transpose(arg_0);
+}
+
+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@0x000002500869E2F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002500869E2F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.glsl
new file mode 100644
index 0000000..306e862
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5f36bf() {
+  f16mat4x3 arg_0 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3x4 res = transpose(arg_0);
+}
+
+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() {
+  f16mat4x3 arg_0 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3x4 res = transpose(arg_0);
+}
+
+void fragment_main() {
+  transpose_5f36bf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5f36bf() {
+  f16mat4x3 arg_0 = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3x4 res = transpose(arg_0);
+}
+
+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/var/transpose/5f36bf.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.msl
new file mode 100644
index 0000000..2f8a2ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_5f36bf() {
+  half4x3 arg_0 = half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h));
+  half3x4 res = transpose(arg_0);
+}
+
+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/var/transpose/5f36bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.spvasm
new file mode 100644
index 0000000..8a2641b
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; 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 %transpose_5f36bf "transpose_5f36bf"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat4v3half
+%_ptr_Function_mat4v3half = OpTypePointer Function %mat4v3half
+     %v4half = OpTypeVector %half 4
+ %mat3v4half = OpTypeMatrix %v4half 3
+%_ptr_Function_mat3v4half = OpTypePointer Function %mat3v4half
+         %25 = OpConstantNull %mat3v4half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_5f36bf = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat4v3half Function %16
+        %res = OpVariable %_ptr_Function_mat3v4half Function %25
+               OpStore %arg_0 %16
+         %22 = OpLoad %mat4v3half %arg_0
+         %19 = OpTranspose %mat3v4half %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %transpose_5f36bf
+               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 %transpose_5f36bf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %transpose_5f36bf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.wgsl
new file mode 100644
index 0000000..4fe2031
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_5f36bf() {
+  var arg_0 = mat4x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat3x4<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/7be8b2.wgsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl
new file mode 100644
index 0000000..7102102
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat2x2<f16>(f16(), f16(), f16(), f16());
+  var res: mat2x2<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/7be8b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ee1edd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_7be8b2() {
+  matrix<float16_t, 2, 2> arg_0 = matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+  matrix<float16_t, 2, 2> res = transpose(arg_0);
+}
+
+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/var/transpose/7be8b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cd61e2c
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_7be8b2() {
+  matrix<float16_t, 2, 2> arg_0 = matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+  matrix<float16_t, 2, 2> res = transpose(arg_0);
+}
+
+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@0x0000015E28C70990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E28C70990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.glsl
new file mode 100644
index 0000000..f9c1764
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_7be8b2() {
+  f16mat2 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2 res = transpose(arg_0);
+}
+
+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 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2 res = transpose(arg_0);
+}
+
+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 arg_0 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2 res = transpose(arg_0);
+}
+
+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/var/transpose/7be8b2.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.msl
new file mode 100644
index 0000000..f53a158
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_7be8b2() {
+  half2x2 arg_0 = half2x2(half2(0.0h), half2(0.0h));
+  half2x2 res = transpose(arg_0);
+}
+
+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/var/transpose/7be8b2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.spvasm
new file mode 100644
index 0000000..f676cac
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat2v2half
+%_ptr_Function_mat2v2half = OpTypePointer Function %mat2v2half
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_7be8b2 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat2v2half Function %16
+        %res = OpVariable %_ptr_Function_mat2v2half Function %16
+               OpStore %arg_0 %16
+         %20 = OpLoad %mat2v2half %arg_0
+         %19 = OpTranspose %mat2v2half %20
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %transpose_7be8b2
+               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 %transpose_7be8b2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %transpose_7be8b2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.wgsl
new file mode 100644
index 0000000..277d2e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_7be8b2() {
+  var arg_0 = mat2x2<f16>(f16(), f16(), f16(), f16());
+  var res : mat2x2<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/844869.wgsl b/test/tint/builtins/gen/var/transpose/844869.wgsl
new file mode 100644
index 0000000..920f444
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat4x4<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/844869.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..17bcee8
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_844869() {
+  matrix<float16_t, 4, 4> arg_0 = 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);
+  matrix<float16_t, 4, 4> res = transpose(arg_0);
+}
+
+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/var/transpose/844869.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..62a9408
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_844869() {
+  matrix<float16_t, 4, 4> arg_0 = 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);
+  matrix<float16_t, 4, 4> res = transpose(arg_0);
+}
+
+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@0x000001A73CD16C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A73CD16C90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.glsl
new file mode 100644
index 0000000..9726985
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_844869() {
+  f16mat4 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4 res = transpose(arg_0);
+}
+
+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 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4 res = transpose(arg_0);
+}
+
+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 arg_0 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4 res = transpose(arg_0);
+}
+
+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/var/transpose/844869.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.msl
new file mode 100644
index 0000000..564ba7d
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_844869() {
+  half4x4 arg_0 = half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h));
+  half4x4 res = transpose(arg_0);
+}
+
+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/var/transpose/844869.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.spvasm
new file mode 100644
index 0000000..204bd6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat4v4half
+%_ptr_Function_mat4v4half = OpTypePointer Function %mat4v4half
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_844869 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat4v4half Function %16
+        %res = OpVariable %_ptr_Function_mat4v4half Function %16
+               OpStore %arg_0 %16
+         %20 = OpLoad %mat4v4half %arg_0
+         %19 = OpTranspose %mat4v4half %20
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %transpose_844869
+               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 %transpose_844869
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %transpose_844869
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.wgsl
new file mode 100644
index 0000000..a96ffd3
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_844869() {
+  var arg_0 = mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat4x4<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/8c06ce.wgsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl
new file mode 100644
index 0000000..5916913
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat3x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat4x3<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/8c06ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8af9aa1
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_8c06ce() {
+  matrix<float16_t, 3, 4> arg_0 = matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+  matrix<float16_t, 4, 3> res = transpose(arg_0);
+}
+
+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/var/transpose/8c06ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..478d92f
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_8c06ce() {
+  matrix<float16_t, 3, 4> arg_0 = matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+  matrix<float16_t, 4, 3> res = transpose(arg_0);
+}
+
+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@0x0000018FE8A7D600(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FE8A7D600(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.glsl
new file mode 100644
index 0000000..eb6e17c
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_8c06ce() {
+  f16mat3x4 arg_0 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4x3 res = transpose(arg_0);
+}
+
+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() {
+  f16mat3x4 arg_0 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4x3 res = transpose(arg_0);
+}
+
+void fragment_main() {
+  transpose_8c06ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_8c06ce() {
+  f16mat3x4 arg_0 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4x3 res = transpose(arg_0);
+}
+
+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/var/transpose/8c06ce.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.msl
new file mode 100644
index 0000000..ae175b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_8c06ce() {
+  half3x4 arg_0 = half3x4(half4(0.0h), half4(0.0h), half4(0.0h));
+  half4x3 res = transpose(arg_0);
+}
+
+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/var/transpose/8c06ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..c01b8c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; 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 %transpose_8c06ce "transpose_8c06ce"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat3v4half
+%_ptr_Function_mat3v4half = OpTypePointer Function %mat3v4half
+     %v3half = OpTypeVector %half 3
+ %mat4v3half = OpTypeMatrix %v3half 4
+%_ptr_Function_mat4v3half = OpTypePointer Function %mat4v3half
+         %25 = OpConstantNull %mat4v3half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_8c06ce = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat3v4half Function %16
+        %res = OpVariable %_ptr_Function_mat4v3half Function %25
+               OpStore %arg_0 %16
+         %22 = OpLoad %mat3v4half %arg_0
+         %19 = OpTranspose %mat4v3half %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %transpose_8c06ce
+               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 %transpose_8c06ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %transpose_8c06ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..ee401e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_8c06ce() {
+  var arg_0 = mat3x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat4x3<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/b9ad1f.wgsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl
new file mode 100644
index 0000000..fd8dc13
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat3x2<f16>(f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat2x3<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/b9ad1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dae12f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_b9ad1f() {
+  matrix<float16_t, 3, 2> arg_0 = matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+  matrix<float16_t, 2, 3> res = transpose(arg_0);
+}
+
+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/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ba9abbe
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_b9ad1f() {
+  matrix<float16_t, 3, 2> arg_0 = matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+  matrix<float16_t, 2, 3> res = transpose(arg_0);
+}
+
+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@0x000001BE022AEC60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BE022AEC60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.glsl
new file mode 100644
index 0000000..fbe4830
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_b9ad1f() {
+  f16mat3x2 arg_0 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2x3 res = transpose(arg_0);
+}
+
+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() {
+  f16mat3x2 arg_0 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2x3 res = transpose(arg_0);
+}
+
+void fragment_main() {
+  transpose_b9ad1f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_b9ad1f() {
+  f16mat3x2 arg_0 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+  f16mat2x3 res = transpose(arg_0);
+}
+
+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/var/transpose/b9ad1f.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.msl
new file mode 100644
index 0000000..df905fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_b9ad1f() {
+  half3x2 arg_0 = half3x2(half2(0.0h), half2(0.0h), half2(0.0h));
+  half2x3 res = transpose(arg_0);
+}
+
+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/var/transpose/b9ad1f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.spvasm
new file mode 100644
index 0000000..0aefff3
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; 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 %transpose_b9ad1f "transpose_b9ad1f"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat3v2half
+%_ptr_Function_mat3v2half = OpTypePointer Function %mat3v2half
+     %v3half = OpTypeVector %half 3
+ %mat2v3half = OpTypeMatrix %v3half 2
+%_ptr_Function_mat2v3half = OpTypePointer Function %mat2v3half
+         %25 = OpConstantNull %mat2v3half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_b9ad1f = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat3v2half Function %16
+        %res = OpVariable %_ptr_Function_mat2v3half Function %25
+               OpStore %arg_0 %16
+         %22 = OpLoad %mat3v2half %arg_0
+         %19 = OpTranspose %mat2v3half %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %transpose_b9ad1f
+               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 %transpose_b9ad1f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %transpose_b9ad1f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c96a7dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_b9ad1f() {
+  var arg_0 = mat3x2<f16>(f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat2x3<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/d6faec.wgsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl
new file mode 100644
index 0000000..d5b7ec3
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat2x3<f16>(f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat3x2<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/d6faec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5f07e18
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_d6faec() {
+  matrix<float16_t, 2, 3> arg_0 = matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+  matrix<float16_t, 3, 2> res = transpose(arg_0);
+}
+
+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/var/transpose/d6faec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cab5786
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_d6faec() {
+  matrix<float16_t, 2, 3> arg_0 = matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+  matrix<float16_t, 3, 2> res = transpose(arg_0);
+}
+
+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@0x0000022366B94660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022366B94660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.glsl
new file mode 100644
index 0000000..b4d1afe
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_d6faec() {
+  f16mat2x3 arg_0 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3x2 res = transpose(arg_0);
+}
+
+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() {
+  f16mat2x3 arg_0 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3x2 res = transpose(arg_0);
+}
+
+void fragment_main() {
+  transpose_d6faec();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_d6faec() {
+  f16mat2x3 arg_0 = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
+  f16mat3x2 res = transpose(arg_0);
+}
+
+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/var/transpose/d6faec.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.msl
new file mode 100644
index 0000000..1f7eac0
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_d6faec() {
+  half2x3 arg_0 = half2x3(half3(0.0h), half3(0.0h));
+  half3x2 res = transpose(arg_0);
+}
+
+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/var/transpose/d6faec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.spvasm
new file mode 100644
index 0000000..513643d
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; 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 %transpose_d6faec "transpose_d6faec"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat2v3half
+%_ptr_Function_mat2v3half = OpTypePointer Function %mat2v3half
+     %v2half = OpTypeVector %half 2
+ %mat3v2half = OpTypeMatrix %v2half 3
+%_ptr_Function_mat3v2half = OpTypePointer Function %mat3v2half
+         %25 = OpConstantNull %mat3v2half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_d6faec = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat2v3half Function %16
+        %res = OpVariable %_ptr_Function_mat3v2half Function %25
+               OpStore %arg_0 %16
+         %22 = OpLoad %mat2v3half %arg_0
+         %19 = OpTranspose %mat3v2half %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %transpose_d6faec
+               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 %transpose_d6faec
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %transpose_d6faec
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.wgsl
new file mode 100644
index 0000000..472aade
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_d6faec() {
+  var arg_0 = mat2x3<f16>(f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat3x2<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/faeb05.wgsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl
new file mode 100644
index 0000000..0e2feed
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = mat2x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res: mat4x2<f16> = transpose(arg_0);
+}
+
+@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/var/transpose/faeb05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e318602
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void transpose_faeb05() {
+  matrix<float16_t, 2, 4> arg_0 = matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+  matrix<float16_t, 4, 2> res = transpose(arg_0);
+}
+
+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/var/transpose/faeb05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d4414a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void transpose_faeb05() {
+  matrix<float16_t, 2, 4> arg_0 = matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+  matrix<float16_t, 4, 2> res = transpose(arg_0);
+}
+
+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@0x0000018F09DB3BF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F09DB3BF0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.glsl
new file mode 100644
index 0000000..3080917
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_faeb05() {
+  f16mat2x4 arg_0 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4x2 res = transpose(arg_0);
+}
+
+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() {
+  f16mat2x4 arg_0 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4x2 res = transpose(arg_0);
+}
+
+void fragment_main() {
+  transpose_faeb05();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_faeb05() {
+  f16mat2x4 arg_0 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
+  f16mat4x2 res = transpose(arg_0);
+}
+
+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/var/transpose/faeb05.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.msl
new file mode 100644
index 0000000..f941a64
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_faeb05() {
+  half2x4 arg_0 = half2x4(half4(0.0h), half4(0.0h));
+  half4x2 res = transpose(arg_0);
+}
+
+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/var/transpose/faeb05.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.spvasm
new file mode 100644
index 0000000..f7a4c55
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; 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 %transpose_faeb05 "transpose_faeb05"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %16 = OpConstantNull %mat2v4half
+%_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half
+     %v2half = OpTypeVector %half 2
+ %mat4v2half = OpTypeMatrix %v2half 4
+%_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half
+         %25 = OpConstantNull %mat4v2half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_faeb05 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_mat2v4half Function %16
+        %res = OpVariable %_ptr_Function_mat4v2half Function %25
+               OpStore %arg_0 %16
+         %22 = OpLoad %mat2v4half %arg_0
+         %19 = OpTranspose %mat4v2half %22
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %transpose_faeb05
+               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 %transpose_faeb05
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %transpose_faeb05
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.wgsl
new file mode 100644
index 0000000..a6de2cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn transpose_faeb05() {
+  var arg_0 = mat2x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16());
+  var res : mat4x2<f16> = transpose(arg_0);
+}
+
+@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/var/trunc/103ab8.wgsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl
new file mode 100644
index 0000000..144541a
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec3<f16>(f16());
+  var res: vec3<f16> = trunc(arg_0);
+}
+
+@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/var/trunc/103ab8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6adf48c
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void trunc_103ab8() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = trunc(arg_0);
+}
+
+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/var/trunc/103ab8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b061405
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void trunc_103ab8() {
+  vector<float16_t, 3> arg_0 = (float16_t(0.0h)).xxx;
+  vector<float16_t, 3> res = trunc(arg_0);
+}
+
+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@0x0000020DD35586D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020DD35586D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.glsl
new file mode 100644
index 0000000..cd4f15d
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_103ab8() {
+  f16vec3 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = trunc(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = trunc(arg_0);
+}
+
+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 arg_0 = f16vec3(0.0hf);
+  f16vec3 res = trunc(arg_0);
+}
+
+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/var/trunc/103ab8.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.msl
new file mode 100644
index 0000000..3bd56b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_103ab8() {
+  half3 arg_0 = half3(0.0h);
+  half3 res = trunc(arg_0);
+}
+
+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/var/trunc/103ab8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.spvasm
new file mode 100644
index 0000000..7080335
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %trunc_103ab8 "trunc_103ab8"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_103ab8 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function %15
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v3half %arg_0
+         %18 = OpExtInst %v3half %19 Trunc %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %trunc_103ab8
+               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 %trunc_103ab8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %trunc_103ab8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.wgsl
new file mode 100644
index 0000000..a4cd5c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn trunc_103ab8() {
+  var arg_0 = vec3<f16>(f16());
+  var res : vec3<f16> = trunc(arg_0);
+}
+
+@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/var/trunc/a56109.wgsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl
new file mode 100644
index 0000000..f7ece8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec2<f16>(f16());
+  var res: vec2<f16> = trunc(arg_0);
+}
+
+@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/var/trunc/a56109.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..39ea255
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void trunc_a56109() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = trunc(arg_0);
+}
+
+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/var/trunc/a56109.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..36a52b1
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void trunc_a56109() {
+  vector<float16_t, 2> arg_0 = (float16_t(0.0h)).xx;
+  vector<float16_t, 2> res = trunc(arg_0);
+}
+
+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@0x000001DD3B6C86D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD3B6C86D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.glsl
new file mode 100644
index 0000000..754116e
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_a56109() {
+  f16vec2 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = trunc(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = trunc(arg_0);
+}
+
+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 arg_0 = f16vec2(0.0hf);
+  f16vec2 res = trunc(arg_0);
+}
+
+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/var/trunc/a56109.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.msl
new file mode 100644
index 0000000..395166b
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_a56109() {
+  half2 arg_0 = half2(0.0h);
+  half2 res = trunc(arg_0);
+}
+
+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/var/trunc/a56109.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.spvasm
new file mode 100644
index 0000000..fa693e8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %trunc_a56109 "trunc_a56109"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_a56109 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function %15
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v2half %arg_0
+         %18 = OpExtInst %v2half %19 Trunc %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %trunc_a56109
+               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 %trunc_a56109
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %trunc_a56109
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.wgsl
new file mode 100644
index 0000000..be9c55d
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn trunc_a56109() {
+  var arg_0 = vec2<f16>(f16());
+  var res : vec2<f16> = trunc(arg_0);
+}
+
+@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/var/trunc/cc2b0d.wgsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl
new file mode 100644
index 0000000..3aad0e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = f16();
+  var res: f16 = trunc(arg_0);
+}
+
+@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/var/trunc/cc2b0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e998713
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void trunc_cc2b0d() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = trunc(arg_0);
+}
+
+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/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2c934e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void trunc_cc2b0d() {
+  float16_t arg_0 = float16_t(0.0h);
+  float16_t res = trunc(arg_0);
+}
+
+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@0x0000023FD3F982D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023FD3F982D0(2,13-17): error X3000: unrecognized identifier 'arg_0'
+
diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.glsl
new file mode 100644
index 0000000..73a3d1e
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_cc2b0d() {
+  float16_t arg_0 = 0.0hf;
+  float16_t res = trunc(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = trunc(arg_0);
+}
+
+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 arg_0 = 0.0hf;
+  float16_t res = trunc(arg_0);
+}
+
+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/var/trunc/cc2b0d.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.msl
new file mode 100644
index 0000000..3b88cd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_cc2b0d() {
+  half arg_0 = 0.0h;
+  half res = trunc(arg_0);
+}
+
+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/var/trunc/cc2b0d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.spvasm
new file mode 100644
index 0000000..a227bba
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %18 = 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 %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_cc2b0d = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function %14
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %arg_0 %14
+         %19 = OpLoad %half %arg_0
+         %17 = OpExtInst %half %18 Trunc %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %trunc_cc2b0d
+               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 %trunc_cc2b0d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %trunc_cc2b0d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.wgsl
new file mode 100644
index 0000000..5530fe3
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn trunc_cc2b0d() {
+  var arg_0 = f16();
+  var res : f16 = trunc(arg_0);
+}
+
+@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/var/trunc/ce7c17.wgsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl
new file mode 100644
index 0000000..a90b832
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl
@@ -0,0 +1,46 @@
+// 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 arg_0 = vec4<f16>(f16());
+  var res: vec4<f16> = trunc(arg_0);
+}
+
+@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/var/trunc/ce7c17.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b3fc9a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.dxc.hlsl
@@ -0,0 +1,31 @@
+void trunc_ce7c17() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = trunc(arg_0);
+}
+
+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/var/trunc/ce7c17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..58aab6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+SKIP: FAILED
+
+void trunc_ce7c17() {
+  vector<float16_t, 4> arg_0 = (float16_t(0.0h)).xxxx;
+  vector<float16_t, 4> res = trunc(arg_0);
+}
+
+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@0x000001469F0570D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001469F0570D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.glsl
new file mode 100644
index 0000000..53c46bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_ce7c17() {
+  f16vec4 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = trunc(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = trunc(arg_0);
+}
+
+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 arg_0 = f16vec4(0.0hf);
+  f16vec4 res = trunc(arg_0);
+}
+
+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/var/trunc/ce7c17.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.msl
new file mode 100644
index 0000000..183371d
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_ce7c17() {
+  half4 arg_0 = half4(0.0h);
+  half4 res = trunc(arg_0);
+}
+
+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/var/trunc/ce7c17.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.spvasm
new file mode 100644
index 0000000..9341301
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; 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 %trunc_ce7c17 "trunc_ce7c17"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %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
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_ce7c17 = OpFunction %void None %9
+         %12 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function %15
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %arg_0 %15
+         %20 = OpLoad %v4half %arg_0
+         %18 = OpExtInst %v4half %19 Trunc %20
+               OpStore %res %18
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %trunc_ce7c17
+               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 %trunc_ce7c17
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %trunc_ce7c17
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.wgsl
new file mode 100644
index 0000000..bc7e46a
--- /dev/null
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+enable f16;
+
+fn trunc_ce7c17() {
+  var arg_0 = vec4<f16>(f16());
+  var res : vec4<f16> = trunc(arg_0);
+}
+
+@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/tools/src/tint/intrinsic/gen/gen.go b/tools/src/tint/intrinsic/gen/gen.go
index a426a46..7672019 100644
--- a/tools/src/tint/intrinsic/gen/gen.go
+++ b/tools/src/tint/intrinsic/gen/gen.go
@@ -495,7 +495,7 @@
 }
 
 // OverloadUsesF16 returns true if the overload uses the f16 type anywhere in the signature.
-func OverloadUsesF16(overload *sem.Overload) bool {
+func OverloadUsesF16(overload sem.Overload) bool {
 	for _, param := range overload.Parameters {
 		if DeepestElementType(param.Type).Target.GetName() == "f16" {
 			return true