[tint] Implement quadSwapX, Y and Diagonal

Implement WGSL builtins quadSwapX, quadSwapY, and quadSwapDiagonal in
the SPIR-V IR backend and HLSL AST and IR backends. These are not yet
implemented in the MSL backends. No subgroup support is implemented for
the GLSL backend.

Bug: 354738715
Change-Id: Iff1a17a02d9b875333c49ee49f6149dda970f320
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/202415
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@google.com>
diff --git a/src/tint/cmd/fuzz/wgsl/dictionary.txt b/src/tint/cmd/fuzz/wgsl/dictionary.txt
index 5432fc0..d88e3d3 100644
--- a/src/tint/cmd/fuzz/wgsl/dictionary.txt
+++ b/src/tint/cmd/fuzz/wgsl/dictionary.txt
@@ -320,6 +320,9 @@
 "ptr"
 "push_constant"
 "quadBroadcast"
+"quadSwapDiagonal"
+"quadSwapX"
+"quadSwapY"
 "quantizeToF16"
 "r"
 "r32float"
diff --git a/src/tint/lang/core/builtin_fn.cc b/src/tint/lang/core/builtin_fn.cc
index 51e32ee..63f1bb5 100644
--- a/src/tint/lang/core/builtin_fn.cc
+++ b/src/tint/lang/core/builtin_fn.cc
@@ -459,6 +459,15 @@
     if (name == "quadBroadcast") {
         return BuiltinFn::kQuadBroadcast;
     }
+    if (name == "quadSwapX") {
+        return BuiltinFn::kQuadSwapX;
+    }
+    if (name == "quadSwapY") {
+        return BuiltinFn::kQuadSwapY;
+    }
+    if (name == "quadSwapDiagonal") {
+        return BuiltinFn::kQuadSwapDiagonal;
+    }
     return BuiltinFn::kNone;
 }
 
@@ -746,6 +755,12 @@
             return "subgroupAny";
         case BuiltinFn::kQuadBroadcast:
             return "quadBroadcast";
+        case BuiltinFn::kQuadSwapX:
+            return "quadSwapX";
+        case BuiltinFn::kQuadSwapY:
+            return "quadSwapY";
+        case BuiltinFn::kQuadSwapDiagonal:
+            return "quadSwapDiagonal";
     }
     return "<unknown>";
 }
diff --git a/src/tint/lang/core/builtin_fn.h b/src/tint/lang/core/builtin_fn.h
index 1bc4b6a..8a4f4b4 100644
--- a/src/tint/lang/core/builtin_fn.h
+++ b/src/tint/lang/core/builtin_fn.h
@@ -187,6 +187,9 @@
     kSubgroupAll,
     kSubgroupAny,
     kQuadBroadcast,
+    kQuadSwapX,
+    kQuadSwapY,
+    kQuadSwapDiagonal,
     kNone,
 };
 
@@ -349,6 +352,9 @@
     BuiltinFn::kSubgroupAll,
     BuiltinFn::kSubgroupAny,
     BuiltinFn::kQuadBroadcast,
+    BuiltinFn::kQuadSwapX,
+    BuiltinFn::kQuadSwapY,
+    BuiltinFn::kQuadSwapDiagonal,
 };
 
 /// All builtin function names
@@ -493,6 +499,9 @@
     "subgroupAll",
     "subgroupAny",
     "quadBroadcast",
+    "quadSwapX",
+    "quadSwapY",
+    "quadSwapDiagonal",
 };
 
 /// Determines if the given `f` is a coarse derivative.
diff --git a/src/tint/lang/core/core.def b/src/tint/lang/core/core.def
index 5c1470a..7819df4 100644
--- a/src/tint/lang/core/core.def
+++ b/src/tint/lang/core/core.def
@@ -735,6 +735,12 @@
 @must_use @stage("fragment", "compute") fn subgroupAny(bool) -> bool
 @must_use @stage("fragment", "compute") fn quadBroadcast[T: fiu32_f16](e: T, @const id: iu32) -> T
 @must_use @stage("fragment", "compute") fn quadBroadcast[N: num, T: fiu32_f16](e: vec<N, T>, @const id: iu32) -> vec<N, T>
+@must_use @stage("fragment", "compute") fn quadSwapX[T: fiu32_f16](e: T) -> T
+@must_use @stage("fragment", "compute") fn quadSwapX[N: num, T: fiu32_f16](e: vec<N, T>) -> vec<N, T>
+@must_use @stage("fragment", "compute") fn quadSwapY[T: fiu32_f16](e: T) -> T
+@must_use @stage("fragment", "compute") fn quadSwapY[N: num, T: fiu32_f16](e: vec<N, T>) -> vec<N, T>
+@must_use @stage("fragment", "compute") fn quadSwapDiagonal[T: fiu32_f16](e: T) -> T
+@must_use @stage("fragment", "compute") fn quadSwapDiagonal[N: num, T: fiu32_f16](e: vec<N, T>) -> vec<N, T>
 
 ////////////////////////////////////////////////////////////////////////////////
 // Value constructors                                                         //
diff --git a/src/tint/lang/core/intrinsic/data.cc b/src/tint/lang/core/intrinsic/data.cc
index 2c04151..cefaf5e 100644
--- a/src/tint/lang/core/intrinsic/data.cc
+++ b/src/tint/lang/core/intrinsic/data.cc
@@ -9035,6 +9035,28 @@
   },
   {
     /* [417] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(26),
+    /* parameters */ ParameterIndex(362),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [418] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(25),
+    /* parameters */ ParameterIndex(364),
+    /* return_matcher_indices */ MatcherIndicesIndex(38),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [419] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9045,7 +9067,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(81),
   },
   {
-    /* [418] */
+    /* [420] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9056,7 +9078,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(81),
   },
   {
-    /* [419] */
+    /* [421] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9067,40 +9089,40 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(82),
   },
   {
-    /* [420] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(42),
-    /* parameters */ ParameterIndex(221),
-    /* return_matcher_indices */ MatcherIndicesIndex(44),
-    /* const_eval_fn */ ConstEvalFunctionIndex(82),
-  },
-  {
-    /* [421] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 1,
-    /* templates */ TemplateIndex(36),
-    /* parameters */ ParameterIndex(1),
-    /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(83),
-  },
-  {
     /* [422] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
+    /* templates */ TemplateIndex(42),
+    /* parameters */ ParameterIndex(221),
+    /* return_matcher_indices */ MatcherIndicesIndex(44),
+    /* const_eval_fn */ ConstEvalFunctionIndex(82),
+  },
+  {
+    /* [423] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(36),
+    /* parameters */ ParameterIndex(1),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(83),
+  },
+  {
+    /* [424] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
     /* templates */ TemplateIndex(36),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(44),
     /* const_eval_fn */ ConstEvalFunctionIndex(83),
   },
   {
-    /* [423] */
+    /* [425] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9111,7 +9133,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(92),
   },
   {
-    /* [424] */
+    /* [426] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9122,28 +9144,6 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(92),
   },
   {
-    /* [425] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 2,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 1,
-    /* templates */ TemplateIndex(32),
-    /* parameters */ ParameterIndex(1),
-    /* return_matcher_indices */ MatcherIndicesIndex(43),
-    /* const_eval_fn */ ConstEvalFunctionIndex(97),
-  },
-  {
-    /* [426] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 2,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(32),
-    /* parameters */ ParameterIndex(221),
-    /* return_matcher_indices */ MatcherIndicesIndex(156),
-    /* const_eval_fn */ ConstEvalFunctionIndex(97),
-  },
-  {
     /* [427] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
@@ -9152,7 +9152,7 @@
     /* templates */ TemplateIndex(32),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(43),
-    /* const_eval_fn */ ConstEvalFunctionIndex(98),
+    /* const_eval_fn */ ConstEvalFunctionIndex(97),
   },
   {
     /* [428] */
@@ -9163,7 +9163,7 @@
     /* templates */ TemplateIndex(32),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(156),
-    /* const_eval_fn */ ConstEvalFunctionIndex(98),
+    /* const_eval_fn */ ConstEvalFunctionIndex(97),
   },
   {
     /* [429] */
@@ -9171,10 +9171,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(26),
+    /* templates */ TemplateIndex(32),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(43),
-    /* const_eval_fn */ ConstEvalFunctionIndex(99),
+    /* const_eval_fn */ ConstEvalFunctionIndex(98),
   },
   {
     /* [430] */
@@ -9182,10 +9182,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
-    /* templates */ TemplateIndex(26),
+    /* templates */ TemplateIndex(32),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(156),
-    /* const_eval_fn */ ConstEvalFunctionIndex(99),
+    /* const_eval_fn */ ConstEvalFunctionIndex(98),
   },
   {
     /* [431] */
@@ -9196,7 +9196,7 @@
     /* templates */ TemplateIndex(26),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(43),
-    /* const_eval_fn */ ConstEvalFunctionIndex(100),
+    /* const_eval_fn */ ConstEvalFunctionIndex(99),
   },
   {
     /* [432] */
@@ -9207,7 +9207,7 @@
     /* templates */ TemplateIndex(26),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(156),
-    /* const_eval_fn */ ConstEvalFunctionIndex(100),
+    /* const_eval_fn */ ConstEvalFunctionIndex(99),
   },
   {
     /* [433] */
@@ -9218,7 +9218,7 @@
     /* templates */ TemplateIndex(26),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(43),
-    /* const_eval_fn */ ConstEvalFunctionIndex(101),
+    /* const_eval_fn */ ConstEvalFunctionIndex(100),
   },
   {
     /* [434] */
@@ -9229,7 +9229,7 @@
     /* templates */ TemplateIndex(26),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(156),
-    /* const_eval_fn */ ConstEvalFunctionIndex(101),
+    /* const_eval_fn */ ConstEvalFunctionIndex(100),
   },
   {
     /* [435] */
@@ -9240,7 +9240,7 @@
     /* templates */ TemplateIndex(26),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(43),
-    /* const_eval_fn */ ConstEvalFunctionIndex(102),
+    /* const_eval_fn */ ConstEvalFunctionIndex(101),
   },
   {
     /* [436] */
@@ -9251,7 +9251,7 @@
     /* templates */ TemplateIndex(26),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(156),
-    /* const_eval_fn */ ConstEvalFunctionIndex(102),
+    /* const_eval_fn */ ConstEvalFunctionIndex(101),
   },
   {
     /* [437] */
@@ -9259,10 +9259,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(28),
-    /* parameters */ ParameterIndex(16),
-    /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(103),
+    /* templates */ TemplateIndex(26),
+    /* parameters */ ParameterIndex(1),
+    /* return_matcher_indices */ MatcherIndicesIndex(43),
+    /* const_eval_fn */ ConstEvalFunctionIndex(102),
   },
   {
     /* [438] */
@@ -9270,10 +9270,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
-    /* templates */ TemplateIndex(42),
-    /* parameters */ ParameterIndex(368),
-    /* return_matcher_indices */ MatcherIndicesIndex(44),
-    /* const_eval_fn */ ConstEvalFunctionIndex(103),
+    /* templates */ TemplateIndex(26),
+    /* parameters */ ParameterIndex(221),
+    /* return_matcher_indices */ MatcherIndicesIndex(156),
+    /* const_eval_fn */ ConstEvalFunctionIndex(102),
   },
   {
     /* [439] */
@@ -9284,7 +9284,7 @@
     /* templates */ TemplateIndex(28),
     /* parameters */ ParameterIndex(16),
     /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(104),
+    /* const_eval_fn */ ConstEvalFunctionIndex(103),
   },
   {
     /* [440] */
@@ -9295,10 +9295,32 @@
     /* templates */ TemplateIndex(42),
     /* parameters */ ParameterIndex(368),
     /* return_matcher_indices */ MatcherIndicesIndex(44),
-    /* const_eval_fn */ ConstEvalFunctionIndex(104),
+    /* const_eval_fn */ ConstEvalFunctionIndex(103),
   },
   {
     /* [441] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(28),
+    /* parameters */ ParameterIndex(16),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(104),
+  },
+  {
+    /* [442] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(42),
+    /* parameters */ ParameterIndex(368),
+    /* return_matcher_indices */ MatcherIndicesIndex(44),
+    /* const_eval_fn */ ConstEvalFunctionIndex(104),
+  },
+  {
+    /* [443] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9309,7 +9331,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [442] */
+    /* [444] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9320,7 +9342,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(17),
   },
   {
-    /* [443] */
+    /* [445] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9331,7 +9353,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(19),
   },
   {
-    /* [444] */
+    /* [446] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9342,7 +9364,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(21),
   },
   {
-    /* [445] */
+    /* [447] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9353,7 +9375,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(22),
   },
   {
-    /* [446] */
+    /* [448] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9364,7 +9386,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(23),
   },
   {
-    /* [447] */
+    /* [449] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
@@ -9375,7 +9397,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(27),
   },
   {
-    /* [448] */
+    /* [450] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9386,7 +9408,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(44),
   },
   {
-    /* [449] */
+    /* [451] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9397,7 +9419,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(45),
   },
   {
-    /* [450] */
+    /* [452] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9408,7 +9430,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(46),
   },
   {
-    /* [451] */
+    /* [453] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9419,7 +9441,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(47),
   },
   {
-    /* [452] */
+    /* [454] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9430,7 +9452,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(48),
   },
   {
-    /* [453] */
+    /* [455] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9441,7 +9463,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(49),
   },
   {
-    /* [454] */
+    /* [456] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9452,7 +9474,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(50),
   },
   {
-    /* [455] */
+    /* [457] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9463,7 +9485,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(51),
   },
   {
-    /* [456] */
+    /* [458] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9474,7 +9496,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(52),
   },
   {
-    /* [457] */
+    /* [459] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9485,7 +9507,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(53),
   },
   {
-    /* [458] */
+    /* [460] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9496,7 +9518,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(57),
   },
   {
-    /* [459] */
+    /* [461] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
@@ -9507,7 +9529,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(58),
   },
   {
-    /* [460] */
+    /* [462] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 0,
     /* num_explicit_templates */ 0,
@@ -9518,7 +9540,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [461] */
+    /* [463] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9529,7 +9551,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(72),
   },
   {
-    /* [462] */
+    /* [464] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9540,7 +9562,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(74),
   },
   {
-    /* [463] */
+    /* [465] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9551,7 +9573,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(75),
   },
   {
-    /* [464] */
+    /* [466] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9562,7 +9584,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(76),
   },
   {
-    /* [465] */
+    /* [467] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9573,7 +9595,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(77),
   },
   {
-    /* [466] */
+    /* [468] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9584,7 +9606,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(78),
   },
   {
-    /* [467] */
+    /* [469] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9595,7 +9617,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(79),
   },
   {
-    /* [468] */
+    /* [470] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9606,7 +9628,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(80),
   },
   {
-    /* [469] */
+    /* [471] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -9617,31 +9639,9 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [470] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(28),
-    /* parameters */ ParameterIndex(0),
-    /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
-    /* [471] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
-    /* num_parameters */ 2,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(28),
-    /* parameters */ ParameterIndex(0),
-    /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
     /* [472] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
-    /* num_parameters */ 2,
+    /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
     /* templates */ TemplateIndex(28),
@@ -9652,6 +9652,28 @@
   {
     /* [473] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(28),
+    /* parameters */ ParameterIndex(0),
+    /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [474] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(28),
+    /* parameters */ ParameterIndex(0),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [475] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
@@ -9661,28 +9683,6 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [474] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 0,
-    /* templates */ TemplateIndex(/* invalid */),
-    /* parameters */ ParameterIndex(224),
-    /* return_matcher_indices */ MatcherIndicesIndex(170),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
-    /* [475] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 0,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 0,
-    /* templates */ TemplateIndex(/* invalid */),
-    /* parameters */ ParameterIndex(/* invalid */),
-    /* return_matcher_indices */ MatcherIndicesIndex(43),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
     /* [476] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
@@ -9690,11 +9690,33 @@
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(224),
-    /* return_matcher_indices */ MatcherIndicesIndex(43),
+    /* return_matcher_indices */ MatcherIndicesIndex(170),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
     /* [477] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 0,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(/* invalid */),
+    /* return_matcher_indices */ MatcherIndicesIndex(43),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [478] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(224),
+    /* return_matcher_indices */ MatcherIndicesIndex(43),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [479] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9705,7 +9727,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(95),
   },
   {
-    /* [478] */
+    /* [480] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -9760,7 +9782,7 @@
     /* [5] */
     /* fn arrayLength[T, A : access](ptr<storage, array<T>, A>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(441),
+    /* overloads */ OverloadIndex(443),
   },
   {
     /* [6] */
@@ -9850,7 +9872,7 @@
     /* [18] */
     /* fn cross[T : f32_f16](vec3<T>, vec3<T>) -> vec3<T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(442),
+    /* overloads */ OverloadIndex(444),
   },
   {
     /* [19] */
@@ -9863,7 +9885,7 @@
     /* [20] */
     /* fn determinant[N : num, T : f32_f16](mat<N, N, T>) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(443),
+    /* overloads */ OverloadIndex(445),
   },
   {
     /* [21] */
@@ -9876,19 +9898,19 @@
     /* [22] */
     /* fn dot[N : num, T : fiu32_f16](vec<N, T>, vec<N, T>) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(444),
+    /* overloads */ OverloadIndex(446),
   },
   {
     /* [23] */
     /* fn dot4I8Packed(u32, u32) -> i32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(445),
+    /* overloads */ OverloadIndex(447),
   },
   {
     /* [24] */
     /* fn dot4U8Packed(u32, u32) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(446),
+    /* overloads */ OverloadIndex(448),
   },
   {
     /* [25] */
@@ -9957,7 +9979,7 @@
     /* [34] */
     /* fn faceForward[N : num, T : f32_f16](vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(447),
+    /* overloads */ OverloadIndex(449),
   },
   {
     /* [35] */
@@ -10097,61 +10119,61 @@
     /* [54] */
     /* fn normalize[N : num, T : f32_f16](vec<N, T>) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(448),
+    /* overloads */ OverloadIndex(450),
   },
   {
     /* [55] */
     /* fn pack2x16float(vec2<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(449),
+    /* overloads */ OverloadIndex(451),
   },
   {
     /* [56] */
     /* fn pack2x16snorm(vec2<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(450),
+    /* overloads */ OverloadIndex(452),
   },
   {
     /* [57] */
     /* fn pack2x16unorm(vec2<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(451),
+    /* overloads */ OverloadIndex(453),
   },
   {
     /* [58] */
     /* fn pack4x8snorm(vec4<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(452),
+    /* overloads */ OverloadIndex(454),
   },
   {
     /* [59] */
     /* fn pack4x8unorm(vec4<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(453),
+    /* overloads */ OverloadIndex(455),
   },
   {
     /* [60] */
     /* fn pack4xI8(vec4<i32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(454),
+    /* overloads */ OverloadIndex(456),
   },
   {
     /* [61] */
     /* fn pack4xU8(vec4<u32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(455),
+    /* overloads */ OverloadIndex(457),
   },
   {
     /* [62] */
     /* fn pack4xI8Clamp(vec4<i32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(456),
+    /* overloads */ OverloadIndex(458),
   },
   {
     /* [63] */
     /* fn pack4xU8Clamp(vec4<u32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(457),
+    /* overloads */ OverloadIndex(459),
   },
   {
     /* [64] */
@@ -10178,13 +10200,13 @@
     /* [67] */
     /* fn reflect[N : num, T : f32_f16](vec<N, T>, vec<N, T>) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(458),
+    /* overloads */ OverloadIndex(460),
   },
   {
     /* [68] */
     /* fn refract[N : num, T : f32_f16](vec<N, T>, vec<N, T>, T) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(459),
+    /* overloads */ OverloadIndex(461),
   },
   {
     /* [69] */
@@ -10261,7 +10283,7 @@
     /* [79] */
     /* fn storageBarrier() */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(460),
+    /* overloads */ OverloadIndex(462),
   },
   {
     /* [80] */
@@ -10281,7 +10303,7 @@
     /* [82] */
     /* fn transpose[M : num, N : num, T : f32_f16](mat<M, N, T>) -> mat<N, M, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(461),
+    /* overloads */ OverloadIndex(463),
   },
   {
     /* [83] */
@@ -10294,55 +10316,55 @@
     /* [84] */
     /* fn unpack2x16float(u32) -> vec2<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(462),
+    /* overloads */ OverloadIndex(464),
   },
   {
     /* [85] */
     /* fn unpack2x16snorm(u32) -> vec2<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(463),
+    /* overloads */ OverloadIndex(465),
   },
   {
     /* [86] */
     /* fn unpack2x16unorm(u32) -> vec2<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(464),
+    /* overloads */ OverloadIndex(466),
   },
   {
     /* [87] */
     /* fn unpack4x8snorm(u32) -> vec4<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(465),
+    /* overloads */ OverloadIndex(467),
   },
   {
     /* [88] */
     /* fn unpack4x8unorm(u32) -> vec4<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(466),
+    /* overloads */ OverloadIndex(468),
   },
   {
     /* [89] */
     /* fn unpack4xI8(u32) -> vec4<i32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(467),
+    /* overloads */ OverloadIndex(469),
   },
   {
     /* [90] */
     /* fn unpack4xU8(u32) -> vec4<u32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(468),
+    /* overloads */ OverloadIndex(470),
   },
   {
     /* [91] */
     /* fn workgroupBarrier() */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(460),
+    /* overloads */ OverloadIndex(462),
   },
   {
     /* [92] */
     /* fn textureBarrier() */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(460),
+    /* overloads */ OverloadIndex(462),
   },
   {
     /* [93] */
@@ -10577,85 +10599,85 @@
     /* [108] */
     /* fn inputAttachmentLoad[T : fiu32](input_attachment: input_attachment<T>) -> vec4<T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(469),
+    /* overloads */ OverloadIndex(471),
   },
   {
     /* [109] */
     /* fn atomicLoad[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(470),
+    /* overloads */ OverloadIndex(472),
   },
   {
     /* [110] */
     /* fn atomicStore[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(471),
+    /* overloads */ OverloadIndex(473),
   },
   {
     /* [111] */
     /* fn atomicAdd[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [112] */
     /* fn atomicSub[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [113] */
     /* fn atomicMax[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [114] */
     /* fn atomicMin[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [115] */
     /* fn atomicAnd[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [116] */
     /* fn atomicOr[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [117] */
     /* fn atomicXor[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [118] */
     /* fn atomicExchange[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(472),
+    /* overloads */ OverloadIndex(474),
   },
   {
     /* [119] */
     /* fn atomicCompareExchangeWeak[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(473),
+    /* overloads */ OverloadIndex(475),
   },
   {
     /* [120] */
     /* fn subgroupBallot(bool) -> vec4<u32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(474),
+    /* overloads */ OverloadIndex(476),
   },
   {
     /* [121] */
     /* fn subgroupElect() -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(475),
+    /* overloads */ OverloadIndex(477),
   },
   {
     /* [122] */
@@ -10766,13 +10788,13 @@
     /* [137] */
     /* fn subgroupAll(bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(476),
+    /* overloads */ OverloadIndex(478),
   },
   {
     /* [138] */
     /* fn subgroupAny(bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(476),
+    /* overloads */ OverloadIndex(478),
   },
   {
     /* [139] */
@@ -10781,6 +10803,27 @@
     /* num overloads */ 2,
     /* overloads */ OverloadIndex(415),
   },
+  {
+    /* [140] */
+    /* fn quadSwapX[T : fiu32_f16](e: T) -> T */
+    /* fn quadSwapX[N : num, T : fiu32_f16](e: vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ OverloadIndex(417),
+  },
+  {
+    /* [141] */
+    /* fn quadSwapY[T : fiu32_f16](e: T) -> T */
+    /* fn quadSwapY[N : num, T : fiu32_f16](e: vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ OverloadIndex(417),
+  },
+  {
+    /* [142] */
+    /* fn quadSwapDiagonal[T : fiu32_f16](e: T) -> T */
+    /* fn quadSwapDiagonal[N : num, T : fiu32_f16](e: vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ OverloadIndex(417),
+  },
 };
 
 constexpr IntrinsicInfo kUnaryOperators[] = {
@@ -10789,21 +10832,21 @@
     /* op !(bool) -> bool */
     /* op ![N : num](vec<N, bool>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(417),
+    /* overloads */ OverloadIndex(419),
   },
   {
     /* [1] */
     /* op ~[T : iu32](T) -> T */
     /* op ~[T : iu32, N : num](vec<N, T>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(419),
+    /* overloads */ OverloadIndex(421),
   },
   {
     /* [2] */
     /* op -[T : fi32_f16](T) -> T */
     /* op -[T : fi32_f16, N : num](vec<N, T>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(421),
+    /* overloads */ OverloadIndex(423),
   },
 };
 constexpr uint8_t kUnaryOperatorNot = 0;
@@ -10868,7 +10911,7 @@
     /* op ^[T : iu32](T, T) -> T */
     /* op ^[T : iu32, N : num](vec<N, T>, vec<N, T>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(423),
+    /* overloads */ OverloadIndex(425),
   },
   {
     /* [6] */
@@ -10892,69 +10935,69 @@
     /* [8] */
     /* op &&(bool, bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(477),
+    /* overloads */ OverloadIndex(479),
   },
   {
     /* [9] */
     /* op ||(bool, bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(478),
+    /* overloads */ OverloadIndex(480),
   },
   {
     /* [10] */
     /* op ==[T : scalar](T, T) -> bool */
     /* op ==[T : scalar, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(425),
+    /* overloads */ OverloadIndex(427),
   },
   {
     /* [11] */
     /* op !=[T : scalar](T, T) -> bool */
     /* op !=[T : scalar, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(427),
+    /* overloads */ OverloadIndex(429),
   },
   {
     /* [12] */
     /* op <[T : fiu32_f16](T, T) -> bool */
     /* op <[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(429),
+    /* overloads */ OverloadIndex(431),
   },
   {
     /* [13] */
     /* op >[T : fiu32_f16](T, T) -> bool */
     /* op >[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(431),
+    /* overloads */ OverloadIndex(433),
   },
   {
     /* [14] */
     /* op <=[T : fiu32_f16](T, T) -> bool */
     /* op <=[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(433),
+    /* overloads */ OverloadIndex(435),
   },
   {
     /* [15] */
     /* op >=[T : fiu32_f16](T, T) -> bool */
     /* op >=[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(435),
+    /* overloads */ OverloadIndex(437),
   },
   {
     /* [16] */
     /* op <<[T : iu32](T, u32) -> T */
     /* op <<[T : iu32, N : num](vec<N, T>, vec<N, u32>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(437),
+    /* overloads */ OverloadIndex(439),
   },
   {
     /* [17] */
     /* op >>[T : iu32](T, u32) -> T */
     /* op >>[T : iu32, N : num](vec<N, T>, vec<N, u32>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(439),
+    /* overloads */ OverloadIndex(441),
   },
 };
 constexpr uint8_t kBinaryOperatorPlus = 0;
diff --git a/src/tint/lang/core/ir/binary/decode.cc b/src/tint/lang/core/ir/binary/decode.cc
index d0b0f34..1a0bcd4 100644
--- a/src/tint/lang/core/ir/binary/decode.cc
+++ b/src/tint/lang/core/ir/binary/decode.cc
@@ -1665,6 +1665,12 @@
                 return core::BuiltinFn::kSubgroupAny;
             case pb::BuiltinFn::quad_broadcast:
                 return core::BuiltinFn::kQuadBroadcast;
+            case pb::BuiltinFn::quad_swap_x:
+                return core::BuiltinFn::kQuadSwapX;
+            case pb::BuiltinFn::quad_swap_y:
+                return core::BuiltinFn::kQuadSwapY;
+            case pb::BuiltinFn::quad_swap_diagonal:
+                return core::BuiltinFn::kQuadSwapDiagonal;
 
             case pb::BuiltinFn::BuiltinFn_INT_MIN_SENTINEL_DO_NOT_USE_:
             case pb::BuiltinFn::BuiltinFn_INT_MAX_SENTINEL_DO_NOT_USE_:
diff --git a/src/tint/lang/core/ir/binary/encode.cc b/src/tint/lang/core/ir/binary/encode.cc
index 540c541..543cefd 100644
--- a/src/tint/lang/core/ir/binary/encode.cc
+++ b/src/tint/lang/core/ir/binary/encode.cc
@@ -1177,6 +1177,12 @@
                 return pb::BuiltinFn::subgroup_any;
             case core::BuiltinFn::kQuadBroadcast:
                 return pb::BuiltinFn::quad_broadcast;
+            case core::BuiltinFn::kQuadSwapX:
+                return pb::BuiltinFn::quad_swap_x;
+            case core::BuiltinFn::kQuadSwapY:
+                return pb::BuiltinFn::quad_swap_y;
+            case core::BuiltinFn::kQuadSwapDiagonal:
+                return pb::BuiltinFn::quad_swap_diagonal;
             case core::BuiltinFn::kNone:
                 break;
         }
diff --git a/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc b/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc
index ce4f29c..e2b3b59 100644
--- a/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc
+++ b/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc
@@ -3174,6 +3174,12 @@
             return "WaveActiveAnyTrue";
         case wgsl::BuiltinFn::kQuadBroadcast:
             return "QuadReadLaneAt";
+        case wgsl::BuiltinFn::kQuadSwapX:
+            return "QuadReadAcrossX";
+        case wgsl::BuiltinFn::kQuadSwapY:
+            return "QuadReadAcrossY";
+        case wgsl::BuiltinFn::kQuadSwapDiagonal:
+            return "QuadReadAcrossDiagonal";
         default:
             diagnostics_.AddError(Source{}) << "Unknown builtin method: " << builtin->str();
     }
diff --git a/src/tint/lang/hlsl/writer/printer/printer.cc b/src/tint/lang/hlsl/writer/printer/printer.cc
index 96b0796..5e42810 100644
--- a/src/tint/lang/hlsl/writer/printer/printer.cc
+++ b/src/tint/lang/hlsl/writer/printer/printer.cc
@@ -1050,6 +1050,15 @@
             case core::BuiltinFn::kQuadBroadcast:
                 out << "QuadReadLaneAt";
                 break;
+            case core::BuiltinFn::kQuadSwapX:
+                out << "QuadReadAcrossX";
+                break;
+            case core::BuiltinFn::kQuadSwapY:
+                out << "QuadReadAcrossY";
+                break;
+            case core::BuiltinFn::kQuadSwapDiagonal:
+                out << "QuadReadAcrossDiagonal";
+                break;
             default:
                 TINT_UNREACHABLE() << "unhandled: " << func;
         }
diff --git a/src/tint/lang/spirv/writer/printer/printer.cc b/src/tint/lang/spirv/writer/printer/printer.cc
index 9f2f870..13ca11e 100644
--- a/src/tint/lang/spirv/writer/printer/printer.cc
+++ b/src/tint/lang/spirv/writer/printer/printer.cc
@@ -1408,6 +1408,9 @@
             operands.push_back(U32Operand(inst));
         };
 
+        // TODO(crbug.com/359883869): Clean up this emission logic so this flag isn't necessary.
+        bool args_emitted = false;
+
         // Determine the opcode.
         switch (builtin->Func()) {
             case core::BuiltinFn::kAbs:
@@ -1603,6 +1606,30 @@
                 op = spv::Op::OpGroupNonUniformQuadBroadcast;
                 operands.push_back(Constant(ir_.constant_values.Get(u32(spv::Scope::Subgroup))));
                 break;
+            case core::BuiltinFn::kQuadSwapX:
+                module_.PushCapability(SpvCapabilityGroupNonUniformQuad);
+                op = spv::Op::OpGroupNonUniformQuadSwap;
+                operands.push_back(Constant(ir_.constant_values.Get(u32(spv::Scope::Subgroup))));
+                operands.push_back(Value(builtin->Args()[0]));
+                operands.push_back(Constant(ir_.constant_values.Get(0_u)));  // Direction
+                args_emitted = true;
+                break;
+            case core::BuiltinFn::kQuadSwapY:
+                module_.PushCapability(SpvCapabilityGroupNonUniformQuad);
+                op = spv::Op::OpGroupNonUniformQuadSwap;
+                operands.push_back(Constant(ir_.constant_values.Get(u32(spv::Scope::Subgroup))));
+                operands.push_back(Value(builtin->Args()[0]));
+                operands.push_back(Constant(ir_.constant_values.Get(1_u)));  // Direction
+                args_emitted = true;
+                break;
+            case core::BuiltinFn::kQuadSwapDiagonal:
+                module_.PushCapability(SpvCapabilityGroupNonUniformQuad);
+                op = spv::Op::OpGroupNonUniformQuadSwap;
+                operands.push_back(Constant(ir_.constant_values.Get(u32(spv::Scope::Subgroup))));
+                operands.push_back(Value(builtin->Args()[0]));
+                operands.push_back(Constant(ir_.constant_values.Get(2_u)));  // Direction
+                args_emitted = true;
+                break;
             case core::BuiltinFn::kQuantizeToF16:
                 op = spv::Op::OpQuantizeToF16;
                 break;
@@ -1833,8 +1860,10 @@
         TINT_ASSERT(op != spv::Op::Max);
 
         // Add the arguments to the builtin call.
-        for (auto* arg : builtin->Args()) {
-            operands.push_back(Value(arg));
+        if (!args_emitted) {
+            for (auto* arg : builtin->Args()) {
+                operands.push_back(Value(arg));
+            }
         }
 
         // Emit the instruction.
diff --git a/src/tint/lang/wgsl/builtin_fn.cc b/src/tint/lang/wgsl/builtin_fn.cc
index 0c2a1b7..68efef3 100644
--- a/src/tint/lang/wgsl/builtin_fn.cc
+++ b/src/tint/lang/wgsl/builtin_fn.cc
@@ -465,6 +465,15 @@
     if (name == "quadBroadcast") {
         return BuiltinFn::kQuadBroadcast;
     }
+    if (name == "quadSwapX") {
+        return BuiltinFn::kQuadSwapX;
+    }
+    if (name == "quadSwapY") {
+        return BuiltinFn::kQuadSwapY;
+    }
+    if (name == "quadSwapDiagonal") {
+        return BuiltinFn::kQuadSwapDiagonal;
+    }
     if (name == "__tint_materialize") {
         return BuiltinFn::kTintMaterialize;
     }
@@ -759,6 +768,12 @@
             return "subgroupAny";
         case BuiltinFn::kQuadBroadcast:
             return "quadBroadcast";
+        case BuiltinFn::kQuadSwapX:
+            return "quadSwapX";
+        case BuiltinFn::kQuadSwapY:
+            return "quadSwapY";
+        case BuiltinFn::kQuadSwapDiagonal:
+            return "quadSwapDiagonal";
         case BuiltinFn::kTintMaterialize:
             return "__tint_materialize";
     }
@@ -853,6 +868,9 @@
         case BuiltinFn::kSubgroupAll:
         case BuiltinFn::kSubgroupAny:
         case BuiltinFn::kQuadBroadcast:
+        case BuiltinFn::kQuadSwapX:
+        case BuiltinFn::kQuadSwapY:
+        case BuiltinFn::kQuadSwapDiagonal:
             return true;
         default:
             return false;
diff --git a/src/tint/lang/wgsl/builtin_fn.cc.tmpl b/src/tint/lang/wgsl/builtin_fn.cc.tmpl
index 51a43cf..7a88242 100644
--- a/src/tint/lang/wgsl/builtin_fn.cc.tmpl
+++ b/src/tint/lang/wgsl/builtin_fn.cc.tmpl
@@ -129,6 +129,9 @@
         case BuiltinFn::kSubgroupAll:
         case BuiltinFn::kSubgroupAny:
         case BuiltinFn::kQuadBroadcast:
+        case BuiltinFn::kQuadSwapX:
+        case BuiltinFn::kQuadSwapY:
+        case BuiltinFn::kQuadSwapDiagonal:
             return true;
         default:
             return false;
diff --git a/src/tint/lang/wgsl/builtin_fn.h b/src/tint/lang/wgsl/builtin_fn.h
index cfe64d6..7575353 100644
--- a/src/tint/lang/wgsl/builtin_fn.h
+++ b/src/tint/lang/wgsl/builtin_fn.h
@@ -189,6 +189,9 @@
     kSubgroupAll,
     kSubgroupAny,
     kQuadBroadcast,
+    kQuadSwapX,
+    kQuadSwapY,
+    kQuadSwapDiagonal,
     kTintMaterialize,
     kNone,
 };
@@ -354,6 +357,9 @@
     BuiltinFn::kSubgroupAll,
     BuiltinFn::kSubgroupAny,
     BuiltinFn::kQuadBroadcast,
+    BuiltinFn::kQuadSwapX,
+    BuiltinFn::kQuadSwapY,
+    BuiltinFn::kQuadSwapDiagonal,
     BuiltinFn::kTintMaterialize,
 };
 
@@ -501,6 +507,9 @@
     "subgroupAll",
     "subgroupAny",
     "quadBroadcast",
+    "quadSwapX",
+    "quadSwapY",
+    "quadSwapDiagonal",
     "__tint_materialize",
 };
 
diff --git a/src/tint/lang/wgsl/intrinsic/data.cc b/src/tint/lang/wgsl/intrinsic/data.cc
index f4f1806..2e32928 100644
--- a/src/tint/lang/wgsl/intrinsic/data.cc
+++ b/src/tint/lang/wgsl/intrinsic/data.cc
@@ -10481,6 +10481,28 @@
   },
   {
     /* [493] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(86),
+    /* parameters */ ParameterIndex(335),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [494] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(85),
+    /* parameters */ ParameterIndex(337),
+    /* return_matcher_indices */ MatcherIndicesIndex(50),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [495] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10491,7 +10513,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(83),
   },
   {
-    /* [494] */
+    /* [496] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10502,37 +10524,15 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(83),
   },
   {
-    /* [495] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 1,
-    /* templates */ TemplateIndex(99),
-    /* parameters */ ParameterIndex(1),
-    /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(84),
-  },
-  {
-    /* [496] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(99),
-    /* parameters */ ParameterIndex(221),
-    /* return_matcher_indices */ MatcherIndicesIndex(56),
-    /* const_eval_fn */ ConstEvalFunctionIndex(84),
-  },
-  {
     /* [497] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(84),
+    /* templates */ TemplateIndex(99),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(85),
+    /* const_eval_fn */ ConstEvalFunctionIndex(84),
   },
   {
     /* [498] */
@@ -10540,13 +10540,35 @@
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
+    /* templates */ TemplateIndex(99),
+    /* parameters */ ParameterIndex(221),
+    /* return_matcher_indices */ MatcherIndicesIndex(56),
+    /* const_eval_fn */ ConstEvalFunctionIndex(84),
+  },
+  {
+    /* [499] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(84),
+    /* parameters */ ParameterIndex(1),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(85),
+  },
+  {
+    /* [500] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
     /* templates */ TemplateIndex(84),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(56),
     /* const_eval_fn */ ConstEvalFunctionIndex(85),
   },
   {
-    /* [499] */
+    /* [501] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -10557,7 +10579,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(94),
   },
   {
-    /* [500] */
+    /* [502] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -10568,28 +10590,6 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(94),
   },
   {
-    /* [501] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 2,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 1,
-    /* templates */ TemplateIndex(82),
-    /* parameters */ ParameterIndex(1),
-    /* return_matcher_indices */ MatcherIndicesIndex(55),
-    /* const_eval_fn */ ConstEvalFunctionIndex(99),
-  },
-  {
-    /* [502] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 2,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(82),
-    /* parameters */ ParameterIndex(221),
-    /* return_matcher_indices */ MatcherIndicesIndex(113),
-    /* const_eval_fn */ ConstEvalFunctionIndex(99),
-  },
-  {
     /* [503] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
@@ -10598,7 +10598,7 @@
     /* templates */ TemplateIndex(82),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(55),
-    /* const_eval_fn */ ConstEvalFunctionIndex(100),
+    /* const_eval_fn */ ConstEvalFunctionIndex(99),
   },
   {
     /* [504] */
@@ -10609,7 +10609,7 @@
     /* templates */ TemplateIndex(82),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(113),
-    /* const_eval_fn */ ConstEvalFunctionIndex(100),
+    /* const_eval_fn */ ConstEvalFunctionIndex(99),
   },
   {
     /* [505] */
@@ -10617,10 +10617,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(70),
+    /* templates */ TemplateIndex(82),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(55),
-    /* const_eval_fn */ ConstEvalFunctionIndex(101),
+    /* const_eval_fn */ ConstEvalFunctionIndex(100),
   },
   {
     /* [506] */
@@ -10628,10 +10628,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
-    /* templates */ TemplateIndex(70),
+    /* templates */ TemplateIndex(82),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(113),
-    /* const_eval_fn */ ConstEvalFunctionIndex(101),
+    /* const_eval_fn */ ConstEvalFunctionIndex(100),
   },
   {
     /* [507] */
@@ -10642,7 +10642,7 @@
     /* templates */ TemplateIndex(70),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(55),
-    /* const_eval_fn */ ConstEvalFunctionIndex(102),
+    /* const_eval_fn */ ConstEvalFunctionIndex(101),
   },
   {
     /* [508] */
@@ -10653,7 +10653,7 @@
     /* templates */ TemplateIndex(70),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(113),
-    /* const_eval_fn */ ConstEvalFunctionIndex(102),
+    /* const_eval_fn */ ConstEvalFunctionIndex(101),
   },
   {
     /* [509] */
@@ -10664,7 +10664,7 @@
     /* templates */ TemplateIndex(70),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(55),
-    /* const_eval_fn */ ConstEvalFunctionIndex(103),
+    /* const_eval_fn */ ConstEvalFunctionIndex(102),
   },
   {
     /* [510] */
@@ -10675,7 +10675,7 @@
     /* templates */ TemplateIndex(70),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(113),
-    /* const_eval_fn */ ConstEvalFunctionIndex(103),
+    /* const_eval_fn */ ConstEvalFunctionIndex(102),
   },
   {
     /* [511] */
@@ -10686,7 +10686,7 @@
     /* templates */ TemplateIndex(70),
     /* parameters */ ParameterIndex(1),
     /* return_matcher_indices */ MatcherIndicesIndex(55),
-    /* const_eval_fn */ ConstEvalFunctionIndex(104),
+    /* const_eval_fn */ ConstEvalFunctionIndex(103),
   },
   {
     /* [512] */
@@ -10697,7 +10697,7 @@
     /* templates */ TemplateIndex(70),
     /* parameters */ ParameterIndex(221),
     /* return_matcher_indices */ MatcherIndicesIndex(113),
-    /* const_eval_fn */ ConstEvalFunctionIndex(104),
+    /* const_eval_fn */ ConstEvalFunctionIndex(103),
   },
   {
     /* [513] */
@@ -10705,10 +10705,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(99),
-    /* parameters */ ParameterIndex(16),
-    /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(105),
+    /* templates */ TemplateIndex(70),
+    /* parameters */ ParameterIndex(1),
+    /* return_matcher_indices */ MatcherIndicesIndex(55),
+    /* const_eval_fn */ ConstEvalFunctionIndex(104),
   },
   {
     /* [514] */
@@ -10716,10 +10716,10 @@
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
-    /* templates */ TemplateIndex(99),
-    /* parameters */ ParameterIndex(341),
-    /* return_matcher_indices */ MatcherIndicesIndex(56),
-    /* const_eval_fn */ ConstEvalFunctionIndex(105),
+    /* templates */ TemplateIndex(70),
+    /* parameters */ ParameterIndex(221),
+    /* return_matcher_indices */ MatcherIndicesIndex(113),
+    /* const_eval_fn */ ConstEvalFunctionIndex(104),
   },
   {
     /* [515] */
@@ -10730,7 +10730,7 @@
     /* templates */ TemplateIndex(99),
     /* parameters */ ParameterIndex(16),
     /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(106),
+    /* const_eval_fn */ ConstEvalFunctionIndex(105),
   },
   {
     /* [516] */
@@ -10741,10 +10741,32 @@
     /* templates */ TemplateIndex(99),
     /* parameters */ ParameterIndex(341),
     /* return_matcher_indices */ MatcherIndicesIndex(56),
-    /* const_eval_fn */ ConstEvalFunctionIndex(106),
+    /* const_eval_fn */ ConstEvalFunctionIndex(105),
   },
   {
     /* [517] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(99),
+    /* parameters */ ParameterIndex(16),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(106),
+  },
+  {
+    /* [518] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(99),
+    /* parameters */ ParameterIndex(341),
+    /* return_matcher_indices */ MatcherIndicesIndex(56),
+    /* const_eval_fn */ ConstEvalFunctionIndex(106),
+  },
+  {
+    /* [519] */
     /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 1,
@@ -10755,7 +10777,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(108),
   },
   {
-    /* [518] */
+    /* [520] */
     /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10766,7 +10788,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(108),
   },
   {
-    /* [519] */
+    /* [521] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -10777,7 +10799,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(18),
   },
   {
-    /* [520] */
+    /* [522] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10788,7 +10810,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(20),
   },
   {
-    /* [521] */
+    /* [523] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -10799,7 +10821,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(22),
   },
   {
-    /* [522] */
+    /* [524] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -10810,7 +10832,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(23),
   },
   {
-    /* [523] */
+    /* [525] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -10821,7 +10843,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(24),
   },
   {
-    /* [524] */
+    /* [526] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
@@ -10832,7 +10854,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(28),
   },
   {
-    /* [525] */
+    /* [527] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10843,7 +10865,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(45),
   },
   {
-    /* [526] */
+    /* [528] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10854,7 +10876,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(46),
   },
   {
-    /* [527] */
+    /* [529] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10865,7 +10887,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(47),
   },
   {
-    /* [528] */
+    /* [530] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10876,7 +10898,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(48),
   },
   {
-    /* [529] */
+    /* [531] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10887,7 +10909,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(49),
   },
   {
-    /* [530] */
+    /* [532] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10898,7 +10920,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(50),
   },
   {
-    /* [531] */
+    /* [533] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10909,7 +10931,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(51),
   },
   {
-    /* [532] */
+    /* [534] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10920,7 +10942,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(52),
   },
   {
-    /* [533] */
+    /* [535] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10931,7 +10953,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(53),
   },
   {
-    /* [534] */
+    /* [536] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10942,7 +10964,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(54),
   },
   {
-    /* [535] */
+    /* [537] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -10953,7 +10975,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(58),
   },
   {
-    /* [536] */
+    /* [538] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
@@ -10964,7 +10986,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(59),
   },
   {
-    /* [537] */
+    /* [539] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 0,
     /* num_explicit_templates */ 0,
@@ -10975,7 +10997,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [538] */
+    /* [540] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10986,7 +11008,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(73),
   },
   {
-    /* [539] */
+    /* [541] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -10997,7 +11019,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(75),
   },
   {
-    /* [540] */
+    /* [542] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11008,7 +11030,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(76),
   },
   {
-    /* [541] */
+    /* [543] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11019,7 +11041,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(77),
   },
   {
-    /* [542] */
+    /* [544] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11030,7 +11052,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(78),
   },
   {
-    /* [543] */
+    /* [545] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11041,7 +11063,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(79),
   },
   {
-    /* [544] */
+    /* [546] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11052,7 +11074,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(80),
   },
   {
-    /* [545] */
+    /* [547] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11063,7 +11085,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(81),
   },
   {
-    /* [546] */
+    /* [548] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11074,7 +11096,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [547] */
+    /* [549] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11085,31 +11107,9 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [548] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(72),
-    /* parameters */ ParameterIndex(0),
-    /* return_matcher_indices */ MatcherIndicesIndex(3),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
-    /* [549] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
-    /* num_parameters */ 2,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 2,
-    /* templates */ TemplateIndex(72),
-    /* parameters */ ParameterIndex(0),
-    /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
     /* [550] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
-    /* num_parameters */ 2,
+    /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
     /* templates */ TemplateIndex(72),
@@ -11120,6 +11120,28 @@
   {
     /* [551] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(72),
+    /* parameters */ ParameterIndex(0),
+    /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [552] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(72),
+    /* parameters */ ParameterIndex(0),
+    /* return_matcher_indices */ MatcherIndicesIndex(3),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [553] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 2,
@@ -11129,28 +11151,6 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [552] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 1,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 0,
-    /* templates */ TemplateIndex(/* invalid */),
-    /* parameters */ ParameterIndex(224),
-    /* return_matcher_indices */ MatcherIndicesIndex(136),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
-    /* [553] */
-    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
-    /* num_parameters */ 0,
-    /* num_explicit_templates */ 0,
-    /* num_templates   */ 0,
-    /* templates */ TemplateIndex(/* invalid */),
-    /* parameters */ ParameterIndex(/* invalid */),
-    /* return_matcher_indices */ MatcherIndicesIndex(55),
-    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
-  },
-  {
     /* [554] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
@@ -11158,11 +11158,33 @@
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(224),
-    /* return_matcher_indices */ MatcherIndicesIndex(55),
+    /* return_matcher_indices */ MatcherIndicesIndex(136),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
     /* [555] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 0,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(/* invalid */),
+    /* return_matcher_indices */ MatcherIndicesIndex(55),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [556] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(224),
+    /* return_matcher_indices */ MatcherIndicesIndex(55),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [557] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11173,7 +11195,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(82),
   },
   {
-    /* [556] */
+    /* [558] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11184,7 +11206,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [557] */
+    /* [559] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -11195,7 +11217,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [558] */
+    /* [560] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -11206,7 +11228,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(97),
   },
   {
-    /* [559] */
+    /* [561] */
     /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -11367,7 +11389,7 @@
     /* [19] */
     /* fn cross[T : fa_f32_f16](vec3<T>, vec3<T>) -> vec3<T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(519),
+    /* overloads */ OverloadIndex(521),
   },
   {
     /* [20] */
@@ -11380,7 +11402,7 @@
     /* [21] */
     /* fn determinant[N : num, T : fa_f32_f16](mat<N, N, T>) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(520),
+    /* overloads */ OverloadIndex(522),
   },
   {
     /* [22] */
@@ -11393,19 +11415,19 @@
     /* [23] */
     /* fn dot[N : num, T : fia_fiu32_f16](vec<N, T>, vec<N, T>) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(521),
+    /* overloads */ OverloadIndex(523),
   },
   {
     /* [24] */
     /* fn dot4I8Packed(u32, u32) -> i32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(522),
+    /* overloads */ OverloadIndex(524),
   },
   {
     /* [25] */
     /* fn dot4U8Packed(u32, u32) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(523),
+    /* overloads */ OverloadIndex(525),
   },
   {
     /* [26] */
@@ -11474,7 +11496,7 @@
     /* [35] */
     /* fn faceForward[N : num, T : fa_f32_f16](vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(524),
+    /* overloads */ OverloadIndex(526),
   },
   {
     /* [36] */
@@ -11614,61 +11636,61 @@
     /* [55] */
     /* fn normalize[N : num, T : fa_f32_f16](vec<N, T>) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(525),
+    /* overloads */ OverloadIndex(527),
   },
   {
     /* [56] */
     /* fn pack2x16float(vec2<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(526),
+    /* overloads */ OverloadIndex(528),
   },
   {
     /* [57] */
     /* fn pack2x16snorm(vec2<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(527),
+    /* overloads */ OverloadIndex(529),
   },
   {
     /* [58] */
     /* fn pack2x16unorm(vec2<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(528),
+    /* overloads */ OverloadIndex(530),
   },
   {
     /* [59] */
     /* fn pack4x8snorm(vec4<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(529),
+    /* overloads */ OverloadIndex(531),
   },
   {
     /* [60] */
     /* fn pack4x8unorm(vec4<f32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(530),
+    /* overloads */ OverloadIndex(532),
   },
   {
     /* [61] */
     /* fn pack4xI8(vec4<i32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(531),
+    /* overloads */ OverloadIndex(533),
   },
   {
     /* [62] */
     /* fn pack4xU8(vec4<u32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(532),
+    /* overloads */ OverloadIndex(534),
   },
   {
     /* [63] */
     /* fn pack4xI8Clamp(vec4<i32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(533),
+    /* overloads */ OverloadIndex(535),
   },
   {
     /* [64] */
     /* fn pack4xU8Clamp(vec4<u32>) -> u32 */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(534),
+    /* overloads */ OverloadIndex(536),
   },
   {
     /* [65] */
@@ -11695,13 +11717,13 @@
     /* [68] */
     /* fn reflect[N : num, T : fa_f32_f16](vec<N, T>, vec<N, T>) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(535),
+    /* overloads */ OverloadIndex(537),
   },
   {
     /* [69] */
     /* fn refract[N : num, T : fa_f32_f16](vec<N, T>, vec<N, T>, T) -> vec<N, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(536),
+    /* overloads */ OverloadIndex(538),
   },
   {
     /* [70] */
@@ -11778,7 +11800,7 @@
     /* [80] */
     /* fn storageBarrier() */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(537),
+    /* overloads */ OverloadIndex(539),
   },
   {
     /* [81] */
@@ -11798,7 +11820,7 @@
     /* [83] */
     /* fn transpose[M : num, N : num, T : fa_f32_f16](mat<M, N, T>) -> mat<N, M, T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(538),
+    /* overloads */ OverloadIndex(540),
   },
   {
     /* [84] */
@@ -11811,61 +11833,61 @@
     /* [85] */
     /* fn unpack2x16float(u32) -> vec2<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(539),
+    /* overloads */ OverloadIndex(541),
   },
   {
     /* [86] */
     /* fn unpack2x16snorm(u32) -> vec2<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(540),
+    /* overloads */ OverloadIndex(542),
   },
   {
     /* [87] */
     /* fn unpack2x16unorm(u32) -> vec2<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(541),
+    /* overloads */ OverloadIndex(543),
   },
   {
     /* [88] */
     /* fn unpack4x8snorm(u32) -> vec4<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(542),
+    /* overloads */ OverloadIndex(544),
   },
   {
     /* [89] */
     /* fn unpack4x8unorm(u32) -> vec4<f32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(543),
+    /* overloads */ OverloadIndex(545),
   },
   {
     /* [90] */
     /* fn unpack4xI8(u32) -> vec4<i32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(544),
+    /* overloads */ OverloadIndex(546),
   },
   {
     /* [91] */
     /* fn unpack4xU8(u32) -> vec4<u32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(545),
+    /* overloads */ OverloadIndex(547),
   },
   {
     /* [92] */
     /* fn workgroupBarrier() */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(537),
+    /* overloads */ OverloadIndex(539),
   },
   {
     /* [93] */
     /* fn workgroupUniformLoad[T](ptr<workgroup, T, read_write>) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(546),
+    /* overloads */ OverloadIndex(548),
   },
   {
     /* [94] */
     /* fn textureBarrier() */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(537),
+    /* overloads */ OverloadIndex(539),
   },
   {
     /* [95] */
@@ -12117,85 +12139,85 @@
     /* [110] */
     /* fn inputAttachmentLoad[T : fiu32](input_attachment: input_attachment<T>) -> vec4<T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(547),
+    /* overloads */ OverloadIndex(549),
   },
   {
     /* [111] */
     /* fn atomicLoad[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(548),
+    /* overloads */ OverloadIndex(550),
   },
   {
     /* [112] */
     /* fn atomicStore[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(549),
+    /* overloads */ OverloadIndex(551),
   },
   {
     /* [113] */
     /* fn atomicAdd[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [114] */
     /* fn atomicSub[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [115] */
     /* fn atomicMax[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [116] */
     /* fn atomicMin[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [117] */
     /* fn atomicAnd[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [118] */
     /* fn atomicOr[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [119] */
     /* fn atomicXor[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [120] */
     /* fn atomicExchange[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(550),
+    /* overloads */ OverloadIndex(552),
   },
   {
     /* [121] */
     /* fn atomicCompareExchangeWeak[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(551),
+    /* overloads */ OverloadIndex(553),
   },
   {
     /* [122] */
     /* fn subgroupBallot(bool) -> vec4<u32> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(552),
+    /* overloads */ OverloadIndex(554),
   },
   {
     /* [123] */
     /* fn subgroupElect() -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(553),
+    /* overloads */ OverloadIndex(555),
   },
   {
     /* [124] */
@@ -12306,13 +12328,13 @@
     /* [139] */
     /* fn subgroupAll(bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(554),
+    /* overloads */ OverloadIndex(556),
   },
   {
     /* [140] */
     /* fn subgroupAny(bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(554),
+    /* overloads */ OverloadIndex(556),
   },
   {
     /* [141] */
@@ -12323,9 +12345,30 @@
   },
   {
     /* [142] */
+    /* fn quadSwapX[T : fiu32_f16](e: T) -> T */
+    /* fn quadSwapX[N : num, T : fiu32_f16](e: vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ OverloadIndex(493),
+  },
+  {
+    /* [143] */
+    /* fn quadSwapY[T : fiu32_f16](e: T) -> T */
+    /* fn quadSwapY[N : num, T : fiu32_f16](e: vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ OverloadIndex(493),
+  },
+  {
+    /* [144] */
+    /* fn quadSwapDiagonal[T : fiu32_f16](e: T) -> T */
+    /* fn quadSwapDiagonal[N : num, T : fiu32_f16](e: vec<N, T>) -> vec<N, T> */
+    /* num overloads */ 2,
+    /* overloads */ OverloadIndex(493),
+  },
+  {
+    /* [145] */
     /* fn __tint_materialize[T](T) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(555),
+    /* overloads */ OverloadIndex(557),
   },
 };
 
@@ -12334,34 +12377,34 @@
     /* [0] */
     /* op &[S : address_space, T, A : access](ref<S, T, A>) -> ptr<S, T, A> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(556),
+    /* overloads */ OverloadIndex(558),
   },
   {
     /* [1] */
     /* op *[S : address_space, T, A : access](ptr<S, T, A>) -> ref<S, T, A> */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(557),
+    /* overloads */ OverloadIndex(559),
   },
   {
     /* [2] */
     /* op !(bool) -> bool */
     /* op ![N : num](vec<N, bool>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(493),
+    /* overloads */ OverloadIndex(495),
   },
   {
     /* [3] */
     /* op ~[T : ia_iu32](T) -> T */
     /* op ~[T : ia_iu32, N : num](vec<N, T>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(495),
+    /* overloads */ OverloadIndex(497),
   },
   {
     /* [4] */
     /* op -[T : fia_fi32_f16](T) -> T */
     /* op -[T : fia_fi32_f16, N : num](vec<N, T>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(497),
+    /* overloads */ OverloadIndex(499),
   },
 };
 constexpr uint8_t kUnaryOperatorAnd = 0;
@@ -12428,7 +12471,7 @@
     /* op ^[T : ia_iu32](T, T) -> T */
     /* op ^[T : ia_iu32, N : num](vec<N, T>, vec<N, T>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(499),
+    /* overloads */ OverloadIndex(501),
   },
   {
     /* [6] */
@@ -12452,69 +12495,69 @@
     /* [8] */
     /* op &&(bool, bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(558),
+    /* overloads */ OverloadIndex(560),
   },
   {
     /* [9] */
     /* op ||(bool, bool) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(559),
+    /* overloads */ OverloadIndex(561),
   },
   {
     /* [10] */
     /* op ==[T : scalar](T, T) -> bool */
     /* op ==[T : scalar, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(501),
+    /* overloads */ OverloadIndex(503),
   },
   {
     /* [11] */
     /* op !=[T : scalar](T, T) -> bool */
     /* op !=[T : scalar, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(503),
+    /* overloads */ OverloadIndex(505),
   },
   {
     /* [12] */
     /* op <[T : fia_fiu32_f16](T, T) -> bool */
     /* op <[T : fia_fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(505),
+    /* overloads */ OverloadIndex(507),
   },
   {
     /* [13] */
     /* op >[T : fia_fiu32_f16](T, T) -> bool */
     /* op >[T : fia_fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(507),
+    /* overloads */ OverloadIndex(509),
   },
   {
     /* [14] */
     /* op <=[T : fia_fiu32_f16](T, T) -> bool */
     /* op <=[T : fia_fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(509),
+    /* overloads */ OverloadIndex(511),
   },
   {
     /* [15] */
     /* op >=[T : fia_fiu32_f16](T, T) -> bool */
     /* op >=[T : fia_fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(511),
+    /* overloads */ OverloadIndex(513),
   },
   {
     /* [16] */
     /* op <<[T : ia_iu32](T, u32) -> T */
     /* op <<[T : ia_iu32, N : num](vec<N, T>, vec<N, u32>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(513),
+    /* overloads */ OverloadIndex(515),
   },
   {
     /* [17] */
     /* op >>[T : ia_iu32](T, u32) -> T */
     /* op >>[T : ia_iu32, N : num](vec<N, T>, vec<N, u32>) -> vec<N, T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(515),
+    /* overloads */ OverloadIndex(517),
   },
 };
 constexpr uint8_t kBinaryOperatorPlus = 0;
@@ -12778,7 +12821,7 @@
     /* conv packedVec3<T : concrete_scalar>(vec3<T>) -> packedVec3<T> */
     /* conv packedVec3[T : concrete_scalar](vec3<T>) -> packedVec3<T> */
     /* num overloads */ 2,
-    /* overloads */ OverloadIndex(517),
+    /* overloads */ OverloadIndex(519),
   },
 };
 
diff --git a/src/tint/lang/wgsl/reader/lower/lower.cc b/src/tint/lang/wgsl/reader/lower/lower.cc
index 6d1d8aa..6b458fb 100644
--- a/src/tint/lang/wgsl/reader/lower/lower.cc
+++ b/src/tint/lang/wgsl/reader/lower/lower.cc
@@ -186,6 +186,9 @@
         CASE(kSubgroupAll)
         CASE(kSubgroupAny)
         CASE(kQuadBroadcast)
+        CASE(kQuadSwapX)
+        CASE(kQuadSwapY)
+        CASE(kQuadSwapDiagonal)
 
         case tint::wgsl::BuiltinFn::kBitcast:               // should lower to ir::Bitcast
         case tint::wgsl::BuiltinFn::kWorkgroupUniformLoad:  // should be handled in Lower()
diff --git a/src/tint/lang/wgsl/wgsl.def b/src/tint/lang/wgsl/wgsl.def
index 05ec43f..204862e 100644
--- a/src/tint/lang/wgsl/wgsl.def
+++ b/src/tint/lang/wgsl/wgsl.def
@@ -655,6 +655,12 @@
 @must_use @stage("fragment", "compute") fn subgroupAny(bool) -> bool
 @must_use @stage("fragment", "compute") fn quadBroadcast[T: fiu32_f16](e: T, @const id: iu32) -> T
 @must_use @stage("fragment", "compute") fn quadBroadcast[N: num, T: fiu32_f16](e: vec<N, T>, @const id: iu32) -> vec<N, T>
+@must_use @stage("fragment", "compute") fn quadSwapX[T: fiu32_f16](e: T) -> T
+@must_use @stage("fragment", "compute") fn quadSwapX[N: num, T: fiu32_f16](e: vec<N, T>) -> vec<N, T>
+@must_use @stage("fragment", "compute") fn quadSwapY[T: fiu32_f16](e: T) -> T
+@must_use @stage("fragment", "compute") fn quadSwapY[N: num, T: fiu32_f16](e: vec<N, T>) -> vec<N, T>
+@must_use @stage("fragment", "compute") fn quadSwapDiagonal[T: fiu32_f16](e: T) -> T
+@must_use @stage("fragment", "compute") fn quadSwapDiagonal[N: num, T: fiu32_f16](e: vec<N, T>) -> vec<N, T>
 
 ////////////////////////////////////////////////////////////////////////////////
 // Value constructors                                                         //
diff --git a/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc b/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc
index d7a0005..38f03d3 100644
--- a/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc
+++ b/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc
@@ -664,6 +664,9 @@
                     case wgsl::BuiltinFn::kSubgroupAny:
                     case wgsl::BuiltinFn::kSubgroupAll:
                     case wgsl::BuiltinFn::kQuadBroadcast:
+                    case wgsl::BuiltinFn::kQuadSwapX:
+                    case wgsl::BuiltinFn::kQuadSwapY:
+                    case wgsl::BuiltinFn::kQuadSwapDiagonal:
                         Enable(wgsl::Extension::kChromiumExperimentalSubgroups);
                         break;
                     default:
diff --git a/src/tint/lang/wgsl/writer/raise/raise.cc b/src/tint/lang/wgsl/writer/raise/raise.cc
index 222e2fd..2b44b85 100644
--- a/src/tint/lang/wgsl/writer/raise/raise.cc
+++ b/src/tint/lang/wgsl/writer/raise/raise.cc
@@ -190,6 +190,9 @@
         CASE(kSubgroupAny)
         CASE(kSubgroupAll)
         CASE(kQuadBroadcast)
+        CASE(kQuadSwapX)
+        CASE(kQuadSwapY)
+        CASE(kQuadSwapDiagonal)
         case core::BuiltinFn::kNone:
             break;
     }
diff --git a/src/tint/utils/protos/ir/ir.proto b/src/tint/utils/protos/ir/ir.proto
index a70b30f..450df39 100644
--- a/src/tint/utils/protos/ir/ir.proto
+++ b/src/tint/utils/protos/ir/ir.proto
@@ -650,4 +650,7 @@
     subgroup_shuffle_up = 137;
     subgroup_shuffle_down = 138;
     quad_broadcast = 139;
+    quad_swap_x = 140;
+    quad_swap_y = 141;
+    quad_swap_diagonal = 142;
 }
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl
new file mode 100644
index 0000000..5e928c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+
+// fn quadSwapDiagonal(e: vec<2, f16>) -> vec<2, f16>
+fn quadSwapDiagonal_15ac75() -> vec2<f16>{
+  var res: vec2<f16> = quadSwapDiagonal(vec2<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..faffe0c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapDiagonal_15ac75() {
+  vector<float16_t, 2> res = QuadReadAcrossDiagonal((float16_t(1.0h)).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..795f4a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapDiagonal_15ac75() {
+  vector<float16_t, 2> res = QuadReadAcrossDiagonal((float16_t(1.0h)).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.glsl
new file mode 100644
index 0000000..e6c7004
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapDiagonal(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapDiagonal(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.msl
new file mode 100644
index 0000000..4d52eed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapDiagonal(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.spvasm
new file mode 100644
index 0000000..83891cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_15ac75 "quadSwapDiagonal_15ac75"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+%tint_symbol_1 = OpTypeStruct %v2half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_15ac75 = OpFunction %v2half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function
+          %9 = OpGroupNonUniformQuadSwap %v2half %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v2half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2half %quadSwapDiagonal_15ac75
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2half %quadSwapDiagonal_15ac75
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.wgsl
new file mode 100644
index 0000000..ce6904c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/15ac75.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapDiagonal(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl
new file mode 100644
index 0000000..fdd5fa7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+
+// fn quadSwapDiagonal(e: f16) -> f16
+fn quadSwapDiagonal_2be5e7() -> f16{
+  var res: f16 = quadSwapDiagonal(1.h);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..51260e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapDiagonal_2be5e7() {
+  float16_t res = QuadReadAcrossDiagonal(float16_t(1.0h));
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5bdb0ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapDiagonal_2be5e7() {
+  float16_t res = QuadReadAcrossDiagonal(float16_t(1.0h));
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.glsl
new file mode 100644
index 0000000..edabc99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var res : f16 = quadSwapDiagonal(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var res : f16 = quadSwapDiagonal(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.msl
new file mode 100644
index 0000000..223e354
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var res : f16 = quadSwapDiagonal(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..756176a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.spvasm
@@ -0,0 +1,61 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_2be5e7 "quadSwapDiagonal_2be5e7"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+%tint_symbol_1 = OpTypeStruct %half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_half = OpTypePointer Function %half
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_2be5e7 = OpFunction %half None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function
+          %8 = OpGroupNonUniformQuadSwap %half %uint_3 %half_0x1p_0 %uint_2
+               OpStore %res %8
+         %15 = OpLoad %half %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %half %quadSwapDiagonal_2be5e7
+         %21 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %half %quadSwapDiagonal_2be5e7
+         %27 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..a582797
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/2be5e7.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var res : f16 = quadSwapDiagonal(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl
new file mode 100644
index 0000000..b24dcdf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+
+// fn quadSwapDiagonal(e: vec<4, f32>) -> vec<4, f32>
+fn quadSwapDiagonal_331804() -> vec4<f32>{
+  var res: vec4<f32> = quadSwapDiagonal(vec4<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..344b18e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapDiagonal_331804() {
+  float4 res = QuadReadAcrossDiagonal((1.0f).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..42e2a76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapDiagonal_331804() {
+  float4 res = QuadReadAcrossDiagonal((1.0f).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.glsl
new file mode 100644
index 0000000..76b6673
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapDiagonal(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapDiagonal(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.msl
new file mode 100644
index 0000000..45c2044
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapDiagonal(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.spvasm
new file mode 100644
index 0000000..912a8e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_331804 "quadSwapDiagonal_331804"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%tint_symbol_1 = OpTypeStruct %v4float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_331804 = OpFunction %v4float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function
+          %9 = OpGroupNonUniformQuadSwap %v4float %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v4float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4float %quadSwapDiagonal_331804
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %quadSwapDiagonal_331804
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.wgsl
new file mode 100644
index 0000000..efe159c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/331804.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapDiagonal(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl
new file mode 100644
index 0000000..4ae3fc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+
+// fn quadSwapDiagonal(e: vec<2, u32>) -> vec<2, u32>
+fn quadSwapDiagonal_348173() -> vec2<u32>{
+  var res: vec2<u32> = quadSwapDiagonal(vec2<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7a55a4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapDiagonal_348173() {
+  uint2 res = QuadReadAcrossDiagonal((1u).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..073bb06
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapDiagonal_348173() {
+  uint2 res = QuadReadAcrossDiagonal((1u).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.glsl
new file mode 100644
index 0000000..49337a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapDiagonal(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapDiagonal(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.msl
new file mode 100644
index 0000000..8f21d6e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapDiagonal(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.spvasm
new file mode 100644
index 0000000..e15caa5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_348173 "quadSwapDiagonal_348173"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%tint_symbol_1 = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v2uint %uint_1 %uint_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_348173 = OpFunction %v2uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function
+          %9 = OpGroupNonUniformQuadSwap %v2uint %uint_3 %11 %uint_2
+               OpStore %res %9
+         %16 = OpLoad %v2uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %v2uint %quadSwapDiagonal_348173
+         %22 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %26 = OpLabel
+         %27 = OpFunctionCall %v2uint %quadSwapDiagonal_348173
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.wgsl
new file mode 100644
index 0000000..24552c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/348173.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapDiagonal(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl
new file mode 100644
index 0000000..bcbabe1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+
+// fn quadSwapDiagonal(e: f32) -> f32
+fn quadSwapDiagonal_486196() -> f32{
+  var res: f32 = quadSwapDiagonal(1.f);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..90ccb2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapDiagonal_486196() {
+  float res = QuadReadAcrossDiagonal(1.0f);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5b94f27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapDiagonal_486196() {
+  float res = QuadReadAcrossDiagonal(1.0f);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.glsl
new file mode 100644
index 0000000..887a356
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var res : f32 = quadSwapDiagonal(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var res : f32 = quadSwapDiagonal(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.msl
new file mode 100644
index 0000000..bf00d28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var res : f32 = quadSwapDiagonal(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.spvasm
new file mode 100644
index 0000000..a8dcd0b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_486196 "quadSwapDiagonal_486196"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+%tint_symbol_1 = OpTypeStruct %float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_float = OpTypePointer Function %float
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_486196 = OpFunction %float None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function
+          %8 = OpGroupNonUniformQuadSwap %float %uint_3 %float_1 %uint_2
+               OpStore %res %8
+         %15 = OpLoad %float %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %float %quadSwapDiagonal_486196
+         %21 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %float %quadSwapDiagonal_486196
+         %27 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.wgsl
new file mode 100644
index 0000000..71c2bdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/486196.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var res : f32 = quadSwapDiagonal(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl
new file mode 100644
index 0000000..6ddb1b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+
+// fn quadSwapDiagonal(e: u32) -> u32
+fn quadSwapDiagonal_730e40() -> u32{
+  var res: u32 = quadSwapDiagonal(1u);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..25297ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapDiagonal_730e40() {
+  uint res = QuadReadAcrossDiagonal(1u);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3b35454
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapDiagonal_730e40() {
+  uint res = QuadReadAcrossDiagonal(1u);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.glsl
new file mode 100644
index 0000000..a4464c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var res : u32 = quadSwapDiagonal(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var res : u32 = quadSwapDiagonal(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.msl
new file mode 100644
index 0000000..e7b96b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var res : u32 = quadSwapDiagonal(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.spvasm
new file mode 100644
index 0000000..05adc5a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.spvasm
@@ -0,0 +1,57 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 27
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_730e40 "quadSwapDiagonal_730e40"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+%tint_symbol_1 = OpTypeStruct %uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_uint = OpTypePointer Function %uint
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_730e40 = OpFunction %uint None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function
+          %8 = OpGroupNonUniformQuadSwap %uint %uint_3 %uint_1 %uint_2
+               OpStore %res %8
+         %14 = OpLoad %uint %res
+               OpReturnValue %14
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %18 = OpLabel
+         %19 = OpFunctionCall %uint %quadSwapDiagonal_730e40
+         %20 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %20 %19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %24 = OpLabel
+         %25 = OpFunctionCall %uint %quadSwapDiagonal_730e40
+         %26 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %26 %25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.wgsl
new file mode 100644
index 0000000..1392c1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/730e40.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var res : u32 = quadSwapDiagonal(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl
new file mode 100644
index 0000000..0ced20b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+
+// fn quadSwapDiagonal(e: vec<2, f32>) -> vec<2, f32>
+fn quadSwapDiagonal_8077c8() -> vec2<f32>{
+  var res: vec2<f32> = quadSwapDiagonal(vec2<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d12c216
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapDiagonal_8077c8() {
+  float2 res = QuadReadAcrossDiagonal((1.0f).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5464fbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapDiagonal_8077c8() {
+  float2 res = QuadReadAcrossDiagonal((1.0f).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.glsl
new file mode 100644
index 0000000..5870d7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapDiagonal(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapDiagonal(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.msl
new file mode 100644
index 0000000..ce5a8e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapDiagonal(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.spvasm
new file mode 100644
index 0000000..93f8bad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_8077c8 "quadSwapDiagonal_8077c8"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v2float = OpTypeVector %float 2
+%tint_symbol_1 = OpTypeStruct %v2float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v2float %float_1 %float_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_8077c8 = OpFunction %v2float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2float Function
+          %9 = OpGroupNonUniformQuadSwap %v2float %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v2float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2float %quadSwapDiagonal_8077c8
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2float %quadSwapDiagonal_8077c8
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.wgsl
new file mode 100644
index 0000000..638c566
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/8077c8.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapDiagonal(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl
new file mode 100644
index 0000000..59371ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+
+// fn quadSwapDiagonal(e: vec<3, u32>) -> vec<3, u32>
+fn quadSwapDiagonal_856536() -> vec3<u32>{
+  var res: vec3<u32> = quadSwapDiagonal(vec3<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5153112
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapDiagonal_856536() {
+  uint3 res = QuadReadAcrossDiagonal((1u).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8675ff0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapDiagonal_856536() {
+  uint3 res = QuadReadAcrossDiagonal((1u).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.glsl
new file mode 100644
index 0000000..4422e38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapDiagonal(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapDiagonal(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.msl
new file mode 100644
index 0000000..cbc6975
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapDiagonal(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.spvasm
new file mode 100644
index 0000000..cc14e5f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_856536 "quadSwapDiagonal_856536"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%tint_symbol_1 = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_856536 = OpFunction %v3uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function
+          %9 = OpGroupNonUniformQuadSwap %v3uint %uint_3 %11 %uint_2
+               OpStore %res %9
+         %16 = OpLoad %v3uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %v3uint %quadSwapDiagonal_856536
+         %22 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %26 = OpLabel
+         %27 = OpFunctionCall %v3uint %quadSwapDiagonal_856536
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.wgsl
new file mode 100644
index 0000000..321ff01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/856536.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapDiagonal(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl
new file mode 100644
index 0000000..57cf97b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+
+// fn quadSwapDiagonal(e: i32) -> i32
+fn quadSwapDiagonal_9ccb38() -> i32{
+  var res: i32 = quadSwapDiagonal(1i);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..81a89e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapDiagonal_9ccb38() {
+  int res = QuadReadAcrossDiagonal(1);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b2ce2d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapDiagonal_9ccb38() {
+  int res = QuadReadAcrossDiagonal(1);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.glsl
new file mode 100644
index 0000000..1f407a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var res : i32 = quadSwapDiagonal(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var res : i32 = quadSwapDiagonal(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.msl
new file mode 100644
index 0000000..c65ead4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var res : i32 = quadSwapDiagonal(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.spvasm
new file mode 100644
index 0000000..3ad11d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_9ccb38 "quadSwapDiagonal_9ccb38"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+%tint_symbol_1 = OpTypeStruct %int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_int = OpTypePointer Function %int
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_9ccb38 = OpFunction %int None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_int Function
+          %8 = OpGroupNonUniformQuadSwap %int %uint_3 %int_1 %uint_2
+               OpStore %res %8
+         %15 = OpLoad %int %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %int %quadSwapDiagonal_9ccb38
+         %21 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %int %quadSwapDiagonal_9ccb38
+         %27 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.wgsl
new file mode 100644
index 0000000..8fa86c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/9ccb38.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var res : i32 = quadSwapDiagonal(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl
new file mode 100644
index 0000000..1f2f4e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+
+// fn quadSwapDiagonal(e: vec<2, i32>) -> vec<2, i32>
+fn quadSwapDiagonal_a090b0() -> vec2<i32>{
+  var res: vec2<i32> = quadSwapDiagonal(vec2<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..526c4e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapDiagonal_a090b0() {
+  int2 res = QuadReadAcrossDiagonal((1).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..df39dd1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapDiagonal_a090b0() {
+  int2 res = QuadReadAcrossDiagonal((1).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.glsl
new file mode 100644
index 0000000..ecb545a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapDiagonal(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapDiagonal(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.msl
new file mode 100644
index 0000000..2ae25f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapDiagonal(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..6946c07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_a090b0 "quadSwapDiagonal_a090b0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%tint_symbol_1 = OpTypeStruct %v2int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_a090b0 = OpFunction %v2int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function
+          %9 = OpGroupNonUniformQuadSwap %v2int %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v2int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2int %quadSwapDiagonal_a090b0
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2int %quadSwapDiagonal_a090b0
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..98a0f19
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a090b0.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapDiagonal(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl
new file mode 100644
index 0000000..e72cbd42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+
+// fn quadSwapDiagonal(e: vec<4, i32>) -> vec<4, i32>
+fn quadSwapDiagonal_a665b1() -> vec4<i32>{
+  var res: vec4<i32> = quadSwapDiagonal(vec4<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..371daa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapDiagonal_a665b1() {
+  int4 res = QuadReadAcrossDiagonal((1).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..291275b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapDiagonal_a665b1() {
+  int4 res = QuadReadAcrossDiagonal((1).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.glsl
new file mode 100644
index 0000000..9e3228a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapDiagonal(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapDiagonal(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.msl
new file mode 100644
index 0000000..10957e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapDiagonal(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..cee54c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_a665b1 "quadSwapDiagonal_a665b1"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%tint_symbol_1 = OpTypeStruct %v4int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_a665b1 = OpFunction %v4int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function
+          %9 = OpGroupNonUniformQuadSwap %v4int %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v4int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4int %quadSwapDiagonal_a665b1
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4int %quadSwapDiagonal_a665b1
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..c9fe077
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a665b1.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapDiagonal(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl
new file mode 100644
index 0000000..2f3a9a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+
+// fn quadSwapDiagonal(e: vec<3, i32>) -> vec<3, i32>
+fn quadSwapDiagonal_a82e1d() -> vec3<i32>{
+  var res: vec3<i32> = quadSwapDiagonal(vec3<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b96ef1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapDiagonal_a82e1d() {
+  int3 res = QuadReadAcrossDiagonal((1).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c0d2297
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapDiagonal_a82e1d() {
+  int3 res = QuadReadAcrossDiagonal((1).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.glsl
new file mode 100644
index 0000000..2203e48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapDiagonal(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapDiagonal(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.msl
new file mode 100644
index 0000000..7dba196
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapDiagonal(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.spvasm
new file mode 100644
index 0000000..72677bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_a82e1d "quadSwapDiagonal_a82e1d"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%tint_symbol_1 = OpTypeStruct %v3int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_a82e1d = OpFunction %v3int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3int Function
+          %9 = OpGroupNonUniformQuadSwap %v3int %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v3int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3int %quadSwapDiagonal_a82e1d
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3int %quadSwapDiagonal_a82e1d
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.wgsl
new file mode 100644
index 0000000..0e8cda3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/a82e1d.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapDiagonal(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl
new file mode 100644
index 0000000..197e6b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+
+// fn quadSwapDiagonal(e: vec<4, f16>) -> vec<4, f16>
+fn quadSwapDiagonal_af19a5() -> vec4<f16>{
+  var res: vec4<f16> = quadSwapDiagonal(vec4<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f7d84e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapDiagonal_af19a5() {
+  vector<float16_t, 4> res = QuadReadAcrossDiagonal((float16_t(1.0h)).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b75aef0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapDiagonal_af19a5() {
+  vector<float16_t, 4> res = QuadReadAcrossDiagonal((float16_t(1.0h)).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.glsl
new file mode 100644
index 0000000..82891ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapDiagonal(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapDiagonal(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.msl
new file mode 100644
index 0000000..0ece294
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapDiagonal(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.spvasm
new file mode 100644
index 0000000..54cf7a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_af19a5 "quadSwapDiagonal_af19a5"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+%tint_symbol_1 = OpTypeStruct %v4half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_af19a5 = OpFunction %v4half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function
+          %9 = OpGroupNonUniformQuadSwap %v4half %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v4half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4half %quadSwapDiagonal_af19a5
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4half %quadSwapDiagonal_af19a5
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.wgsl
new file mode 100644
index 0000000..9fa3764
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/af19a5.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapDiagonal(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl
new file mode 100644
index 0000000..bf8b1f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+
+// fn quadSwapDiagonal(e: vec<3, f32>) -> vec<3, f32>
+fn quadSwapDiagonal_b905fc() -> vec3<f32>{
+  var res: vec3<f32> = quadSwapDiagonal(vec3<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..80c9b1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapDiagonal_b905fc() {
+  float3 res = QuadReadAcrossDiagonal((1.0f).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..130fed1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapDiagonal_b905fc() {
+  float3 res = QuadReadAcrossDiagonal((1.0f).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.glsl
new file mode 100644
index 0000000..e90dfcd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapDiagonal(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapDiagonal(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.msl
new file mode 100644
index 0000000..69f807c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapDiagonal(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..960ea17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_b905fc "quadSwapDiagonal_b905fc"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v3float = OpTypeVector %float 3
+%tint_symbol_1 = OpTypeStruct %v3float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_b905fc = OpFunction %v3float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3float Function
+          %9 = OpGroupNonUniformQuadSwap %v3float %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v3float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3float %quadSwapDiagonal_b905fc
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3float %quadSwapDiagonal_b905fc
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..a85c16e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/b905fc.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapDiagonal(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl
new file mode 100644
index 0000000..6b57584
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+
+// fn quadSwapDiagonal(e: vec<4, u32>) -> vec<4, u32>
+fn quadSwapDiagonal_c31636() -> vec4<u32>{
+  var res: vec4<u32> = quadSwapDiagonal(vec4<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fc185cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapDiagonal_c31636() {
+  uint4 res = QuadReadAcrossDiagonal((1u).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ac99418
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapDiagonal_c31636() {
+  uint4 res = QuadReadAcrossDiagonal((1u).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.glsl
new file mode 100644
index 0000000..62b84ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapDiagonal(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapDiagonal(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.msl
new file mode 100644
index 0000000..0ff8731
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapDiagonal(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.spvasm
new file mode 100644
index 0000000..0bc2ba9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_c31636 "quadSwapDiagonal_c31636"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v4uint = OpTypeVector %uint 4
+%tint_symbol_1 = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_c31636 = OpFunction %v4uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function
+          %9 = OpGroupNonUniformQuadSwap %v4uint %uint_3 %11 %uint_2
+               OpStore %res %9
+         %16 = OpLoad %v4uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %v4uint %quadSwapDiagonal_c31636
+         %22 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4uint %quadSwapDiagonal_c31636
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.wgsl
new file mode 100644
index 0000000..2844671
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/c31636.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapDiagonal(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl
new file mode 100644
index 0000000..36001fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+
+// fn quadSwapDiagonal(e: vec<3, f16>) -> vec<3, f16>
+fn quadSwapDiagonal_e4bec8() -> vec3<f16>{
+  var res: vec3<f16> = quadSwapDiagonal(vec3<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f30a405
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapDiagonal_e4bec8() {
+  vector<float16_t, 3> res = QuadReadAcrossDiagonal((float16_t(1.0h)).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3692dc7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapDiagonal_e4bec8() {
+  vector<float16_t, 3> res = QuadReadAcrossDiagonal((float16_t(1.0h)).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.glsl
new file mode 100644
index 0000000..a35177f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapDiagonal(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapDiagonal(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.msl
new file mode 100644
index 0000000..b761433
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapDiagonal(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.spvasm
new file mode 100644
index 0000000..1a95639
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_e4bec8 "quadSwapDiagonal_e4bec8"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+%tint_symbol_1 = OpTypeStruct %v3half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+     %uint_2 = OpConstant %uint 2
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_e4bec8 = OpFunction %v3half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function
+          %9 = OpGroupNonUniformQuadSwap %v3half %uint_3 %12 %uint_2
+               OpStore %res %9
+         %17 = OpLoad %v3half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3half %quadSwapDiagonal_e4bec8
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3half %quadSwapDiagonal_e4bec8
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.wgsl
new file mode 100644
index 0000000..16ad676
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapDiagonal/e4bec8.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapDiagonal(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl
new file mode 100644
index 0000000..c7ed52d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+
+// fn quadSwapX(e: vec<4, f16>) -> vec<4, f16>
+fn quadSwapX_02834c() -> vec4<f16>{
+  var res: vec4<f16> = quadSwapX(vec4<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bd1bc11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapX_02834c() {
+  vector<float16_t, 4> res = QuadReadAcrossX((float16_t(1.0h)).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d0756ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapX_02834c() {
+  vector<float16_t, 4> res = QuadReadAcrossX((float16_t(1.0h)).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.glsl
new file mode 100644
index 0000000..76342a1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapX(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapX(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.msl
new file mode 100644
index 0000000..f6afa81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapX(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.spvasm
new file mode 100644
index 0000000..f2850c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_02834c "quadSwapX_02834c"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+%tint_symbol_1 = OpTypeStruct %v4half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
+%quadSwapX_02834c = OpFunction %v4half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function
+          %9 = OpGroupNonUniformQuadSwap %v4half %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v4half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4half %quadSwapX_02834c
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4half %quadSwapX_02834c
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.wgsl
new file mode 100644
index 0000000..aa18692
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/02834c.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapX(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl
new file mode 100644
index 0000000..aaf5bb1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+
+// fn quadSwapX(e: vec<3, i32>) -> vec<3, i32>
+fn quadSwapX_053f3b() -> vec3<i32>{
+  var res: vec3<i32> = quadSwapX(vec3<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bada2a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapX_053f3b() {
+  int3 res = QuadReadAcrossX((1).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5098d8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapX_053f3b() {
+  int3 res = QuadReadAcrossX((1).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.glsl
new file mode 100644
index 0000000..4ab5c7b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapX(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapX(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.msl
new file mode 100644
index 0000000..80e8412
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapX(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..6260c61
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_053f3b "quadSwapX_053f3b"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%tint_symbol_1 = OpTypeStruct %v3int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
+%quadSwapX_053f3b = OpFunction %v3int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3int Function
+          %9 = OpGroupNonUniformQuadSwap %v3int %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v3int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3int %quadSwapX_053f3b
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v3int %quadSwapX_053f3b
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..bb173a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/053f3b.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapX(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl
new file mode 100644
index 0000000..dea6a37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+
+// fn quadSwapX(e: vec<4, u32>) -> vec<4, u32>
+fn quadSwapX_07f1fc() -> vec4<u32>{
+  var res: vec4<u32> = quadSwapX(vec4<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..45c8c47
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapX_07f1fc() {
+  uint4 res = QuadReadAcrossX((1u).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1cf6efb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapX_07f1fc() {
+  uint4 res = QuadReadAcrossX((1u).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.glsl
new file mode 100644
index 0000000..4807e48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapX(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapX(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.msl
new file mode 100644
index 0000000..4ff3b62
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapX(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..d1a2814
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_07f1fc "quadSwapX_07f1fc"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v4uint = OpTypeVector %uint 4
+%tint_symbol_1 = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+%quadSwapX_07f1fc = OpFunction %v4uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function
+          %9 = OpGroupNonUniformQuadSwap %v4uint %uint_3 %11 %uint_0
+               OpStore %res %9
+         %16 = OpLoad %v4uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %v4uint %quadSwapX_07f1fc
+         %22 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4uint %quadSwapX_07f1fc
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f60a00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/07f1fc.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapX(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl
new file mode 100644
index 0000000..9907bc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+
+// fn quadSwapX(e: vec<3, f32>) -> vec<3, f32>
+fn quadSwapX_150d6f() -> vec3<f32>{
+  var res: vec3<f32> = quadSwapX(vec3<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..15918d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapX_150d6f() {
+  float3 res = QuadReadAcrossX((1.0f).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b718e42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapX_150d6f() {
+  float3 res = QuadReadAcrossX((1.0f).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.glsl
new file mode 100644
index 0000000..cdff978
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapX(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapX(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.msl
new file mode 100644
index 0000000..6bcdede
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapX(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.spvasm
new file mode 100644
index 0000000..03e4735
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_150d6f "quadSwapX_150d6f"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v3float = OpTypeVector %float 3
+%tint_symbol_1 = OpTypeStruct %v3float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
+%quadSwapX_150d6f = OpFunction %v3float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3float Function
+          %9 = OpGroupNonUniformQuadSwap %v3float %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v3float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3float %quadSwapX_150d6f
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v3float %quadSwapX_150d6f
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.wgsl
new file mode 100644
index 0000000..6d33eb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/150d6f.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapX(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl
new file mode 100644
index 0000000..6250945
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+
+// fn quadSwapX(e: vec<2, u32>) -> vec<2, u32>
+fn quadSwapX_19f8ce() -> vec2<u32>{
+  var res: vec2<u32> = quadSwapX(vec2<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..648d753
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapX_19f8ce() {
+  uint2 res = QuadReadAcrossX((1u).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..208a298
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapX_19f8ce() {
+  uint2 res = QuadReadAcrossX((1u).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.glsl
new file mode 100644
index 0000000..97305be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapX(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapX(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.msl
new file mode 100644
index 0000000..e8e6ccb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapX(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..6538e2a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_19f8ce "quadSwapX_19f8ce"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%tint_symbol_1 = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v2uint %uint_1 %uint_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+%quadSwapX_19f8ce = OpFunction %v2uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function
+          %9 = OpGroupNonUniformQuadSwap %v2uint %uint_3 %11 %uint_0
+               OpStore %res %9
+         %16 = OpLoad %v2uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %v2uint %quadSwapX_19f8ce
+         %22 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %25 = OpLabel
+         %26 = OpFunctionCall %v2uint %quadSwapX_19f8ce
+         %27 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..021fce3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/19f8ce.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapX(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl
new file mode 100644
index 0000000..a0e5141
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+
+// fn quadSwapX(e: i32) -> i32
+fn quadSwapX_1e1086() -> i32{
+  var res: i32 = quadSwapX(1i);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3539144
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapX_1e1086() {
+  int res = QuadReadAcrossX(1);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..abc5946
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapX_1e1086() {
+  int res = QuadReadAcrossX(1);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.glsl
new file mode 100644
index 0000000..645b78f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var res : i32 = quadSwapX(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var res : i32 = quadSwapX(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.msl
new file mode 100644
index 0000000..c270f4b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var res : i32 = quadSwapX(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.spvasm
new file mode 100644
index 0000000..da03795
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.spvasm
@@ -0,0 +1,57 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 27
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_1e1086 "quadSwapX_1e1086"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+%tint_symbol_1 = OpTypeStruct %int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_int = OpTypePointer Function %int
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
+%quadSwapX_1e1086 = OpFunction %int None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_int Function
+          %8 = OpGroupNonUniformQuadSwap %int %uint_3 %int_1 %uint_0
+               OpStore %res %8
+         %15 = OpLoad %int %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %int %quadSwapX_1e1086
+         %21 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %24 = OpLabel
+         %25 = OpFunctionCall %int %quadSwapX_1e1086
+         %26 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %26 %25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.wgsl
new file mode 100644
index 0000000..84ff13a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/1e1086.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var res : i32 = quadSwapX(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl
new file mode 100644
index 0000000..702ea1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+
+// fn quadSwapX(e: vec<4, f32>) -> vec<4, f32>
+fn quadSwapX_69af6a() -> vec4<f32>{
+  var res: vec4<f32> = quadSwapX(vec4<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c2bdb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapX_69af6a() {
+  float4 res = QuadReadAcrossX((1.0f).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b6fb28c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapX_69af6a() {
+  float4 res = QuadReadAcrossX((1.0f).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.glsl
new file mode 100644
index 0000000..016b101
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapX(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapX(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.msl
new file mode 100644
index 0000000..30a122b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapX(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.spvasm
new file mode 100644
index 0000000..acaa2bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_69af6a "quadSwapX_69af6a"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%tint_symbol_1 = OpTypeStruct %v4float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+%quadSwapX_69af6a = OpFunction %v4float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function
+          %9 = OpGroupNonUniformQuadSwap %v4float %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v4float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4float %quadSwapX_69af6a
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %quadSwapX_69af6a
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.wgsl
new file mode 100644
index 0000000..9b9c210
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/69af6a.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapX(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl
new file mode 100644
index 0000000..52e5671
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+
+// fn quadSwapX(e: u32) -> u32
+fn quadSwapX_8203ad() -> u32{
+  var res: u32 = quadSwapX(1u);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d6ccfc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapX_8203ad() {
+  uint res = QuadReadAcrossX(1u);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6ed03e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapX_8203ad() {
+  uint res = QuadReadAcrossX(1u);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.glsl
new file mode 100644
index 0000000..d39e194
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var res : u32 = quadSwapX(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var res : u32 = quadSwapX(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.msl
new file mode 100644
index 0000000..0a862c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var res : u32 = quadSwapX(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.spvasm
new file mode 100644
index 0000000..df0c32a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.spvasm
@@ -0,0 +1,56 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 26
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_8203ad "quadSwapX_8203ad"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+%tint_symbol_1 = OpTypeStruct %uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+%quadSwapX_8203ad = OpFunction %uint None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function
+          %8 = OpGroupNonUniformQuadSwap %uint %uint_3 %uint_1 %uint_0
+               OpStore %res %8
+         %14 = OpLoad %uint %res
+               OpReturnValue %14
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %18 = OpLabel
+         %19 = OpFunctionCall %uint %quadSwapX_8203ad
+         %20 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %20 %19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %23 = OpLabel
+         %24 = OpFunctionCall %uint %quadSwapX_8203ad
+         %25 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.wgsl
new file mode 100644
index 0000000..7fd41da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/8203ad.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var res : u32 = quadSwapX(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl
new file mode 100644
index 0000000..68813e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+
+// fn quadSwapX(e: vec<2, f32>) -> vec<2, f32>
+fn quadSwapX_879738() -> vec2<f32>{
+  var res: vec2<f32> = quadSwapX(vec2<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1412f66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapX_879738() {
+  float2 res = QuadReadAcrossX((1.0f).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6e8b4f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapX_879738() {
+  float2 res = QuadReadAcrossX((1.0f).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.glsl
new file mode 100644
index 0000000..d695a09
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapX(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapX(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.msl
new file mode 100644
index 0000000..dd948de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapX(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.spvasm
new file mode 100644
index 0000000..4be4c60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_879738 "quadSwapX_879738"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v2float = OpTypeVector %float 2
+%tint_symbol_1 = OpTypeStruct %v2float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v2float %float_1 %float_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
+%quadSwapX_879738 = OpFunction %v2float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2float Function
+          %9 = OpGroupNonUniformQuadSwap %v2float %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v2float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2float %quadSwapX_879738
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v2float %quadSwapX_879738
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c12fc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/879738.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapX(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl
new file mode 100644
index 0000000..1d939dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+
+// fn quadSwapX(e: f32) -> f32
+fn quadSwapX_9bea80() -> f32{
+  var res: f32 = quadSwapX(1.f);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c8e63f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapX_9bea80() {
+  float res = QuadReadAcrossX(1.0f);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ac4a89e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapX_9bea80() {
+  float res = QuadReadAcrossX(1.0f);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.glsl
new file mode 100644
index 0000000..00d0119
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var res : f32 = quadSwapX(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var res : f32 = quadSwapX(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.msl
new file mode 100644
index 0000000..54d9783
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var res : f32 = quadSwapX(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.spvasm
new file mode 100644
index 0000000..db6a7fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.spvasm
@@ -0,0 +1,57 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 27
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_9bea80 "quadSwapX_9bea80"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+%tint_symbol_1 = OpTypeStruct %float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_float = OpTypePointer Function %float
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
+%quadSwapX_9bea80 = OpFunction %float None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function
+          %8 = OpGroupNonUniformQuadSwap %float %uint_3 %float_1 %uint_0
+               OpStore %res %8
+         %15 = OpLoad %float %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %float %quadSwapX_9bea80
+         %21 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %24 = OpLabel
+         %25 = OpFunctionCall %float %quadSwapX_9bea80
+         %26 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %26 %25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.wgsl
new file mode 100644
index 0000000..09ccf78
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/9bea80.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var res : f32 = quadSwapX(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl
new file mode 100644
index 0000000..cf3292c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+
+// fn quadSwapX(e: f16) -> f16
+fn quadSwapX_a4e103() -> f16{
+  var res: f16 = quadSwapX(1.h);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..efa896f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapX_a4e103() {
+  float16_t res = QuadReadAcrossX(float16_t(1.0h));
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd0b4d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapX_a4e103() {
+  float16_t res = QuadReadAcrossX(float16_t(1.0h));
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.glsl
new file mode 100644
index 0000000..4ccf0e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var res : f16 = quadSwapX(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var res : f16 = quadSwapX(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.msl
new file mode 100644
index 0000000..a16bb6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var res : f16 = quadSwapX(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.spvasm
new file mode 100644
index 0000000..912f201
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 27
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_a4e103 "quadSwapX_a4e103"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+%tint_symbol_1 = OpTypeStruct %half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_half = OpTypePointer Function %half
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
+%quadSwapX_a4e103 = OpFunction %half None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function
+          %8 = OpGroupNonUniformQuadSwap %half %uint_3 %half_0x1p_0 %uint_0
+               OpStore %res %8
+         %15 = OpLoad %half %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %half %quadSwapX_a4e103
+         %21 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %24 = OpLabel
+         %25 = OpFunctionCall %half %quadSwapX_a4e103
+         %26 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %26 %25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.wgsl
new file mode 100644
index 0000000..4147941
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/a4e103.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var res : f16 = quadSwapX(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl
new file mode 100644
index 0000000..81ad43e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+
+// fn quadSwapX(e: vec<2, i32>) -> vec<2, i32>
+fn quadSwapX_b1a5fe() -> vec2<i32>{
+  var res: vec2<i32> = quadSwapX(vec2<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5e72a10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapX_b1a5fe() {
+  int2 res = QuadReadAcrossX((1).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6fc0210
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapX_b1a5fe() {
+  int2 res = QuadReadAcrossX((1).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.glsl
new file mode 100644
index 0000000..b469976
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapX(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapX(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.msl
new file mode 100644
index 0000000..a28b395
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapX(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..ed213c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_b1a5fe "quadSwapX_b1a5fe"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%tint_symbol_1 = OpTypeStruct %v2int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
+%quadSwapX_b1a5fe = OpFunction %v2int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function
+          %9 = OpGroupNonUniformQuadSwap %v2int %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v2int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2int %quadSwapX_b1a5fe
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v2int %quadSwapX_b1a5fe
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..cb0d159
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/b1a5fe.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapX(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl
new file mode 100644
index 0000000..cc338b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+
+// fn quadSwapX(e: vec<3, f16>) -> vec<3, f16>
+fn quadSwapX_bc2013() -> vec3<f16>{
+  var res: vec3<f16> = quadSwapX(vec3<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5c3ac95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapX_bc2013() {
+  vector<float16_t, 3> res = QuadReadAcrossX((float16_t(1.0h)).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aaaff45
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapX_bc2013() {
+  vector<float16_t, 3> res = QuadReadAcrossX((float16_t(1.0h)).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.glsl
new file mode 100644
index 0000000..441a9f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapX(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapX(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.msl
new file mode 100644
index 0000000..6fd1aae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapX(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.spvasm
new file mode 100644
index 0000000..246f47f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_bc2013 "quadSwapX_bc2013"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+%tint_symbol_1 = OpTypeStruct %v3half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
+%quadSwapX_bc2013 = OpFunction %v3half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function
+          %9 = OpGroupNonUniformQuadSwap %v3half %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v3half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3half %quadSwapX_bc2013
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v3half %quadSwapX_bc2013
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.wgsl
new file mode 100644
index 0000000..e676088
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bc2013.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapX(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl
new file mode 100644
index 0000000..f142bc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+
+// fn quadSwapX(e: vec<3, u32>) -> vec<3, u32>
+fn quadSwapX_bddb9f() -> vec3<u32>{
+  var res: vec3<u32> = quadSwapX(vec3<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f78bb6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapX_bddb9f() {
+  uint3 res = QuadReadAcrossX((1u).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d766eb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapX_bddb9f() {
+  uint3 res = QuadReadAcrossX((1u).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.glsl
new file mode 100644
index 0000000..d82defc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapX(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapX(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.msl
new file mode 100644
index 0000000..8873d12
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapX(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.spvasm
new file mode 100644
index 0000000..d93f520
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_bddb9f "quadSwapX_bddb9f"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%tint_symbol_1 = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+%quadSwapX_bddb9f = OpFunction %v3uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function
+          %9 = OpGroupNonUniformQuadSwap %v3uint %uint_3 %11 %uint_0
+               OpStore %res %9
+         %16 = OpLoad %v3uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %v3uint %quadSwapX_bddb9f
+         %22 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %25 = OpLabel
+         %26 = OpFunctionCall %v3uint %quadSwapX_bddb9f
+         %27 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.wgsl
new file mode 100644
index 0000000..a980c38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/bddb9f.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapX(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl
new file mode 100644
index 0000000..8c105e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+
+// fn quadSwapX(e: vec<2, f16>) -> vec<2, f16>
+fn quadSwapX_d60cec() -> vec2<f16>{
+  var res: vec2<f16> = quadSwapX(vec2<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e476328
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapX_d60cec() {
+  vector<float16_t, 2> res = QuadReadAcrossX((float16_t(1.0h)).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1aa6bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapX_d60cec() {
+  vector<float16_t, 2> res = QuadReadAcrossX((float16_t(1.0h)).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.glsl
new file mode 100644
index 0000000..ce9c896
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapX(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapX(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.msl
new file mode 100644
index 0000000..c26fac8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapX(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.spvasm
new file mode 100644
index 0000000..cf17bd2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_d60cec "quadSwapX_d60cec"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+%tint_symbol_1 = OpTypeStruct %v2half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
+%quadSwapX_d60cec = OpFunction %v2half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function
+          %9 = OpGroupNonUniformQuadSwap %v2half %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v2half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2half %quadSwapX_d60cec
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v2half %quadSwapX_d60cec
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.wgsl
new file mode 100644
index 0000000..9629d8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/d60cec.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapX(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl
new file mode 100644
index 0000000..cce2c3f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+
+// fn quadSwapX(e: vec<4, i32>) -> vec<4, i32>
+fn quadSwapX_edfa1f() -> vec4<i32>{
+  var res: vec4<i32> = quadSwapX(vec4<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a4fe86d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapX_edfa1f() {
+  int4 res = QuadReadAcrossX((1).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6fd95d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapX_edfa1f() {
+  int4 res = QuadReadAcrossX((1).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.glsl
new file mode 100644
index 0000000..883b6d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapX(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapX(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.msl
new file mode 100644
index 0000000..e090397
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapX(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.spvasm
new file mode 100644
index 0000000..0e35978
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.spvasm
@@ -0,0 +1,59 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_edfa1f "quadSwapX_edfa1f"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%tint_symbol_1 = OpTypeStruct %v4int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
+     %uint_0 = OpConstant %uint 0
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+%quadSwapX_edfa1f = OpFunction %v4int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function
+          %9 = OpGroupNonUniformQuadSwap %v4int %uint_3 %12 %uint_0
+               OpStore %res %9
+         %17 = OpLoad %v4int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4int %quadSwapX_edfa1f
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4int %quadSwapX_edfa1f
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.wgsl
new file mode 100644
index 0000000..124263b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapX/edfa1f.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapX(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl
new file mode 100644
index 0000000..ae8de91
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+
+// fn quadSwapY(e: vec<3, u32>) -> vec<3, u32>
+fn quadSwapY_06a67c() -> vec3<u32>{
+  var res: vec3<u32> = quadSwapY(vec3<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4089b25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapY_06a67c() {
+  uint3 res = QuadReadAcrossY((1u).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1b53fba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapY_06a67c() {
+  uint3 res = QuadReadAcrossY((1u).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.glsl
new file mode 100644
index 0000000..62696fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapY(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapY(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.msl
new file mode 100644
index 0000000..0c46bd7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapY(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.spvasm
new file mode 100644
index 0000000..f2e6e8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_06a67c "quadSwapY_06a67c"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%tint_symbol_1 = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_06a67c = OpFunction %v3uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function
+          %9 = OpGroupNonUniformQuadSwap %v3uint %uint_3 %11 %uint_1
+               OpStore %res %9
+         %15 = OpLoad %v3uint %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %v3uint %quadSwapY_06a67c
+         %21 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %v3uint %quadSwapY_06a67c
+         %27 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.wgsl
new file mode 100644
index 0000000..046b378
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/06a67c.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var res : vec3<u32> = quadSwapY(vec3<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl
new file mode 100644
index 0000000..610c7d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+
+// fn quadSwapY(e: u32) -> u32
+fn quadSwapY_0c4938() -> u32{
+  var res: u32 = quadSwapY(1u);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..43e32af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapY_0c4938() {
+  uint res = QuadReadAcrossY(1u);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd64bad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapY_0c4938() {
+  uint res = QuadReadAcrossY(1u);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.glsl
new file mode 100644
index 0000000..7b0047f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var res : u32 = quadSwapY(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var res : u32 = quadSwapY(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.msl
new file mode 100644
index 0000000..94e9bb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var res : u32 = quadSwapY(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.spvasm
new file mode 100644
index 0000000..82fcd6a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.spvasm
@@ -0,0 +1,56 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 26
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_0c4938 "quadSwapY_0c4938"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+%tint_symbol_1 = OpTypeStruct %uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_0c4938 = OpFunction %uint None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function
+          %8 = OpGroupNonUniformQuadSwap %uint %uint_3 %uint_1 %uint_1
+               OpStore %res %8
+         %13 = OpLoad %uint %res
+               OpReturnValue %13
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %17 = OpLabel
+         %18 = OpFunctionCall %uint %quadSwapY_0c4938
+         %19 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %19 %18
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %23 = OpLabel
+         %24 = OpFunctionCall %uint %quadSwapY_0c4938
+         %25 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.wgsl
new file mode 100644
index 0000000..682d48b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0c4938.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var res : u32 = quadSwapY(1u);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl
new file mode 100644
index 0000000..b60cad7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+
+// fn quadSwapY(e: vec<2, i32>) -> vec<2, i32>
+fn quadSwapY_0d05a8() -> vec2<i32>{
+  var res: vec2<i32> = quadSwapY(vec2<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..816595b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapY_0d05a8() {
+  int2 res = QuadReadAcrossY((1).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04ff44b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapY_0d05a8() {
+  int2 res = QuadReadAcrossY((1).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.glsl
new file mode 100644
index 0000000..075089e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapY(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapY(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.msl
new file mode 100644
index 0000000..43f99df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapY(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.spvasm
new file mode 100644
index 0000000..e507d97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_0d05a8 "quadSwapY_0d05a8"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%tint_symbol_1 = OpTypeStruct %v2int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_0d05a8 = OpFunction %v2int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function
+          %9 = OpGroupNonUniformQuadSwap %v2int %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v2int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2int %quadSwapY_0d05a8
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2int %quadSwapY_0d05a8
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.wgsl
new file mode 100644
index 0000000..fd4ea2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/0d05a8.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var res : vec2<i32> = quadSwapY(vec2<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl
new file mode 100644
index 0000000..b3a03e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+
+// fn quadSwapY(e: vec<4, i32>) -> vec<4, i32>
+fn quadSwapY_14bb9a() -> vec4<i32>{
+  var res: vec4<i32> = quadSwapY(vec4<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e53aec0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapY_14bb9a() {
+  int4 res = QuadReadAcrossY((1).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd80016
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapY_14bb9a() {
+  int4 res = QuadReadAcrossY((1).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.glsl
new file mode 100644
index 0000000..2fed78e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapY(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapY(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.msl
new file mode 100644
index 0000000..bd05a67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapY(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.spvasm
new file mode 100644
index 0000000..5fd31f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_14bb9a "quadSwapY_14bb9a"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%tint_symbol_1 = OpTypeStruct %v4int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_14bb9a = OpFunction %v4int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function
+          %9 = OpGroupNonUniformQuadSwap %v4int %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v4int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4int %quadSwapY_14bb9a
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4int %quadSwapY_14bb9a
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.wgsl
new file mode 100644
index 0000000..32e0984
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/14bb9a.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var res : vec4<i32> = quadSwapY(vec4<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl
new file mode 100644
index 0000000..1a928c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+
+// fn quadSwapY(e: vec<2, f32>) -> vec<2, f32>
+fn quadSwapY_1f1a06() -> vec2<f32>{
+  var res: vec2<f32> = quadSwapY(vec2<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..11c6992
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapY_1f1a06() {
+  float2 res = QuadReadAcrossY((1.0f).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2416f7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapY_1f1a06() {
+  float2 res = QuadReadAcrossY((1.0f).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.glsl
new file mode 100644
index 0000000..98ba9e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapY(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapY(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.msl
new file mode 100644
index 0000000..f7b0870
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapY(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd6837b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_1f1a06 "quadSwapY_1f1a06"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v2float = OpTypeVector %float 2
+%tint_symbol_1 = OpTypeStruct %v2float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v2float %float_1 %float_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_1f1a06 = OpFunction %v2float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2float Function
+          %9 = OpGroupNonUniformQuadSwap %v2float %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v2float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2float %quadSwapY_1f1a06
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2float %quadSwapY_1f1a06
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.wgsl
new file mode 100644
index 0000000..5260585
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/1f1a06.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var res : vec2<f32> = quadSwapY(vec2<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl
new file mode 100644
index 0000000..3ddf2e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+
+// fn quadSwapY(e: vec<3, f16>) -> vec<3, f16>
+fn quadSwapY_264908() -> vec3<f16>{
+  var res: vec3<f16> = quadSwapY(vec3<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e4e7075
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapY_264908() {
+  vector<float16_t, 3> res = QuadReadAcrossY((float16_t(1.0h)).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a35e569
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapY_264908() {
+  vector<float16_t, 3> res = QuadReadAcrossY((float16_t(1.0h)).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.glsl
new file mode 100644
index 0000000..0920f11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapY(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapY(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.msl
new file mode 100644
index 0000000..09f7425
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapY(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.spvasm
new file mode 100644
index 0000000..3b1a4b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_264908 "quadSwapY_264908"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+%tint_symbol_1 = OpTypeStruct %v3half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_264908 = OpFunction %v3half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function
+          %9 = OpGroupNonUniformQuadSwap %v3half %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v3half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3half %quadSwapY_264908
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3half %quadSwapY_264908
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.wgsl
new file mode 100644
index 0000000..49f0137
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/264908.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var res : vec3<f16> = quadSwapY(vec3<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl
new file mode 100644
index 0000000..e4c79d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+
+// fn quadSwapY(e: vec<4, f16>) -> vec<4, f16>
+fn quadSwapY_5b2e67() -> vec4<f16>{
+  var res: vec4<f16> = quadSwapY(vec4<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..00a9908
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapY_5b2e67() {
+  vector<float16_t, 4> res = QuadReadAcrossY((float16_t(1.0h)).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bbe37c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapY_5b2e67() {
+  vector<float16_t, 4> res = QuadReadAcrossY((float16_t(1.0h)).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.glsl
new file mode 100644
index 0000000..0682e98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapY(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapY(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.msl
new file mode 100644
index 0000000..f0c2a07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapY(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.spvasm
new file mode 100644
index 0000000..600f639
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_5b2e67 "quadSwapY_5b2e67"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+%tint_symbol_1 = OpTypeStruct %v4half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_5b2e67 = OpFunction %v4half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function
+          %9 = OpGroupNonUniformQuadSwap %v4half %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v4half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4half %quadSwapY_5b2e67
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4half %quadSwapY_5b2e67
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.wgsl
new file mode 100644
index 0000000..4c8a7a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/5b2e67.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var res : vec4<f16> = quadSwapY(vec4<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl
new file mode 100644
index 0000000..d0953f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+
+// fn quadSwapY(e: f32) -> f32
+fn quadSwapY_6f6bc9() -> f32{
+  var res: f32 = quadSwapY(1.f);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68e02e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapY_6f6bc9() {
+  float res = QuadReadAcrossY(1.0f);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6af0a45
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapY_6f6bc9() {
+  float res = QuadReadAcrossY(1.0f);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.glsl
new file mode 100644
index 0000000..64e23f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var res : f32 = quadSwapY(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var res : f32 = quadSwapY(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.msl
new file mode 100644
index 0000000..c5bdbd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var res : f32 = quadSwapY(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.spvasm
new file mode 100644
index 0000000..45f0732
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_6f6bc9 "quadSwapY_6f6bc9"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+%tint_symbol_1 = OpTypeStruct %float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_6f6bc9 = OpFunction %float None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function
+          %8 = OpGroupNonUniformQuadSwap %float %uint_3 %float_1 %uint_1
+               OpStore %res %8
+         %15 = OpLoad %float %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %float %quadSwapY_6f6bc9
+         %21 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %float %quadSwapY_6f6bc9
+         %27 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.wgsl
new file mode 100644
index 0000000..421eb67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/6f6bc9.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var res : f32 = quadSwapY(1.0f);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl
new file mode 100644
index 0000000..f9fcfa9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+
+// fn quadSwapY(e: f16) -> f16
+fn quadSwapY_9277e9() -> f16{
+  var res: f16 = quadSwapY(1.h);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0372128
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapY_9277e9() {
+  float16_t res = QuadReadAcrossY(float16_t(1.0h));
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6f8c2c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapY_9277e9() {
+  float16_t res = QuadReadAcrossY(float16_t(1.0h));
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.glsl
new file mode 100644
index 0000000..21d8ea5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var res : f16 = quadSwapY(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var res : f16 = quadSwapY(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.msl
new file mode 100644
index 0000000..05607cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var res : f16 = quadSwapY(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..2322770
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.spvasm
@@ -0,0 +1,61 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_9277e9 "quadSwapY_9277e9"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+%tint_symbol_1 = OpTypeStruct %half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_half = OpTypePointer Function %half
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_9277e9 = OpFunction %half None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function
+          %8 = OpGroupNonUniformQuadSwap %half %uint_3 %half_0x1p_0 %uint_1
+               OpStore %res %8
+         %15 = OpLoad %half %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %half %quadSwapY_9277e9
+         %21 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %half %quadSwapY_9277e9
+         %27 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..f60d244
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/9277e9.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var res : f16 = quadSwapY(1.0h);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl
new file mode 100644
index 0000000..d89298b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+
+// fn quadSwapY(e: i32) -> i32
+fn quadSwapY_94ab6d() -> i32{
+  var res: i32 = quadSwapY(1i);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6cecd27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapY_94ab6d() {
+  int res = QuadReadAcrossY(1);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eaace97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapY_94ab6d() {
+  int res = QuadReadAcrossY(1);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.glsl
new file mode 100644
index 0000000..29b8c03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var res : i32 = quadSwapY(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var res : i32 = quadSwapY(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.msl
new file mode 100644
index 0000000..7089b1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var res : i32 = quadSwapY(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.spvasm
new file mode 100644
index 0000000..2f4d544
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_94ab6d "quadSwapY_94ab6d"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+%tint_symbol_1 = OpTypeStruct %int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_int = OpTypePointer Function %int
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_94ab6d = OpFunction %int None %6
+          %7 = OpLabel
+        %res = OpVariable %_ptr_Function_int Function
+          %8 = OpGroupNonUniformQuadSwap %int %uint_3 %int_1 %uint_1
+               OpStore %res %8
+         %15 = OpLoad %int %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %int %quadSwapY_94ab6d
+         %21 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %int %quadSwapY_94ab6d
+         %27 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.wgsl
new file mode 100644
index 0000000..b8c2334
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/94ab6d.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var res : i32 = quadSwapY(1i);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl
new file mode 100644
index 0000000..42ab39b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+
+// fn quadSwapY(e: vec<2, u32>) -> vec<2, u32>
+fn quadSwapY_a27e1c() -> vec2<u32>{
+  var res: vec2<u32> = quadSwapY(vec2<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9ed53e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapY_a27e1c() {
+  uint2 res = QuadReadAcrossY((1u).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd069e9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapY_a27e1c() {
+  uint2 res = QuadReadAcrossY((1u).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.glsl
new file mode 100644
index 0000000..7bf8726
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapY(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapY(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.msl
new file mode 100644
index 0000000..74ca974
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapY(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.spvasm
new file mode 100644
index 0000000..b7c5d0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_a27e1c "quadSwapY_a27e1c"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%tint_symbol_1 = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_a27e1c = OpFunction %v2uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function
+          %9 = OpGroupNonUniformQuadSwap %v2uint %uint_3 %11 %uint_1
+               OpStore %res %9
+         %15 = OpLoad %v2uint %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %v2uint %quadSwapY_a27e1c
+         %21 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %v2uint %quadSwapY_a27e1c
+         %27 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.wgsl
new file mode 100644
index 0000000..905707f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a27e1c.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var res : vec2<u32> = quadSwapY(vec2<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl
new file mode 100644
index 0000000..41c9fe2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl
@@ -0,0 +1,62 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+
+// fn quadSwapY(e: vec<2, f16>) -> vec<2, f16>
+fn quadSwapY_a50fcb() -> vec2<f16>{
+  var res: vec2<f16> = quadSwapY(vec2<f16>(1.h));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f50b655
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapY_a50fcb() {
+  vector<float16_t, 2> res = QuadReadAcrossY((float16_t(1.0h)).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..799eef4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapY_a50fcb() {
+  vector<float16_t, 2> res = QuadReadAcrossY((float16_t(1.0h)).xx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.glsl
new file mode 100644
index 0000000..dddac0c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.glsl
@@ -0,0 +1,54 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapY(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapY(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.msl
new file mode 100644
index 0000000..2adf640
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.msl
@@ -0,0 +1,25 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapY(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.spvasm
new file mode 100644
index 0000000..d7bb67f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_a50fcb "quadSwapY_a50fcb"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+%tint_symbol_1 = OpTypeStruct %v2half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2half
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %12 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_a50fcb = OpFunction %v2half None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function
+          %9 = OpGroupNonUniformQuadSwap %v2half %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v2half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2half %quadSwapY_a50fcb
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2half %quadSwapY_a50fcb
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.wgsl
new file mode 100644
index 0000000..10e80c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/a50fcb.wgsl.expected.wgsl
@@ -0,0 +1,20 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var res : vec2<f16> = quadSwapY(vec2<f16>(1.0h));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl
new file mode 100644
index 0000000..43cc753
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+
+// fn quadSwapY(e: vec<4, f32>) -> vec<4, f32>
+fn quadSwapY_b9d9e7() -> vec4<f32>{
+  var res: vec4<f32> = quadSwapY(vec4<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e9e793f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapY_b9d9e7() {
+  float4 res = QuadReadAcrossY((1.0f).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..da25891
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapY_b9d9e7() {
+  float4 res = QuadReadAcrossY((1.0f).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.glsl
new file mode 100644
index 0000000..23726dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapY(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapY(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.msl
new file mode 100644
index 0000000..21bb219
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapY(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..31923e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_b9d9e7 "quadSwapY_b9d9e7"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%tint_symbol_1 = OpTypeStruct %v4float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_b9d9e7 = OpFunction %v4float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function
+          %9 = OpGroupNonUniformQuadSwap %v4float %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v4float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4float %quadSwapY_b9d9e7
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %quadSwapY_b9d9e7
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..b7dbeb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/b9d9e7.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var res : vec4<f32> = quadSwapY(vec4<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl
new file mode 100644
index 0000000..6e87445
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+
+// fn quadSwapY(e: vec<4, u32>) -> vec<4, u32>
+fn quadSwapY_bb697b() -> vec4<u32>{
+  var res: vec4<u32> = quadSwapY(vec4<u32>(1u));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9358086
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapY_bb697b() {
+  uint4 res = QuadReadAcrossY((1u).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4aabf0e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapY_bb697b() {
+  uint4 res = QuadReadAcrossY((1u).xxxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.glsl
new file mode 100644
index 0000000..c274c80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapY(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapY(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.msl
new file mode 100644
index 0000000..6423940
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapY(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.spvasm
new file mode 100644
index 0000000..1beb4be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.spvasm
@@ -0,0 +1,58 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_bb697b "quadSwapY_bb697b"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v4uint = OpTypeVector %uint 4
+%tint_symbol_1 = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4uint
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_bb697b = OpFunction %v4uint None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function
+          %9 = OpGroupNonUniformQuadSwap %v4uint %uint_3 %11 %uint_1
+               OpStore %res %9
+         %15 = OpLoad %v4uint %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %v4uint %quadSwapY_bb697b
+         %21 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4uint %quadSwapY_bb697b
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.wgsl
new file mode 100644
index 0000000..4cfd9f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/bb697b.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var res : vec4<u32> = quadSwapY(vec4<u32>(1u));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl
new file mode 100644
index 0000000..d908fbb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+
+// fn quadSwapY(e: vec<3, i32>) -> vec<3, i32>
+fn quadSwapY_be4e72() -> vec3<i32>{
+  var res: vec3<i32> = quadSwapY(vec3<i32>(1i));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ca2ec31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapY_be4e72() {
+  int3 res = QuadReadAcrossY((1).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69d7da0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapY_be4e72() {
+  int3 res = QuadReadAcrossY((1).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.glsl
new file mode 100644
index 0000000..1f946a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapY(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapY(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.msl
new file mode 100644
index 0000000..d048f22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapY(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.spvasm
new file mode 100644
index 0000000..6b759f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_be4e72 "quadSwapY_be4e72"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%tint_symbol_1 = OpTypeStruct %v3int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3int
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+      %int_1 = OpConstant %int 1
+         %12 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_be4e72 = OpFunction %v3int None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3int Function
+          %9 = OpGroupNonUniformQuadSwap %v3int %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v3int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3int %quadSwapY_be4e72
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3int %quadSwapY_be4e72
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.wgsl
new file mode 100644
index 0000000..205d55a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/be4e72.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var res : vec3<i32> = quadSwapY(vec3<i32>(1i));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl
new file mode 100644
index 0000000..ec7e385
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl
@@ -0,0 +1,58 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+
+// fn quadSwapY(e: vec<3, f32>) -> vec<3, f32>
+fn quadSwapY_d1ab4d() -> vec3<f32>{
+  var res: vec3<f32> = quadSwapY(vec3<f32>(1.f));
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..241319a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapY_d1ab4d() {
+  float3 res = QuadReadAcrossY((1.0f).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e684a87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,19 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapY_d1ab4d() {
+  float3 res = QuadReadAcrossY((1.0f).xxx);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.glsl
new file mode 100644
index 0000000..3e3a8d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.glsl
@@ -0,0 +1,50 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapY(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapY(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.msl b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.msl
new file mode 100644
index 0000000..af21f34
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.msl
@@ -0,0 +1,23 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapY(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.spvasm
new file mode 100644
index 0000000..477e302
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_d1ab4d "quadSwapY_d1ab4d"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v3float = OpTypeVector %float 3
+%tint_symbol_1 = OpTypeStruct %v3float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3float
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_d1ab4d = OpFunction %v3float None %7
+          %8 = OpLabel
+        %res = OpVariable %_ptr_Function_v3float Function
+          %9 = OpGroupNonUniformQuadSwap %v3float %uint_3 %12 %uint_1
+               OpStore %res %9
+         %17 = OpLoad %v3float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3float %quadSwapY_d1ab4d
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3float %quadSwapY_d1ab4d
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.wgsl
new file mode 100644
index 0000000..33e5937
--- /dev/null
+++ b/test/tint/builtins/gen/literal/quadSwapY/d1ab4d.wgsl.expected.wgsl
@@ -0,0 +1,18 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var res : vec3<f32> = quadSwapY(vec3<f32>(1.0f));
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl
new file mode 100644
index 0000000..dff5a55
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+
+// fn quadSwapDiagonal(e: vec<2, f16>) -> vec<2, f16>
+fn quadSwapDiagonal_15ac75() -> vec2<f16>{
+  var arg_0 = vec2<f16>(1.h);
+  var res: vec2<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8b49849
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapDiagonal_15ac75() {
+  vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
+  vector<float16_t, 2> res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a6386f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapDiagonal_15ac75() {
+  vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
+  vector<float16_t, 2> res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapDiagonal_15ac75());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.glsl
new file mode 100644
index 0000000..3c23e50
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.msl
new file mode 100644
index 0000000..b586676
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.spvasm
new file mode 100644
index 0000000..7fbf048
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_15ac75 "quadSwapDiagonal_15ac75"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+%tint_symbol_1 = OpTypeStruct %v2half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_15ac75 = OpFunction %v2half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function
+        %res = OpVariable %_ptr_Function_v2half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2half %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v2half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2half %quadSwapDiagonal_15ac75
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v2half %quadSwapDiagonal_15ac75
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.wgsl
new file mode 100644
index 0000000..bfe113b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/15ac75.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapDiagonal_15ac75() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_15ac75();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl
new file mode 100644
index 0000000..7238ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+
+// fn quadSwapDiagonal(e: f16) -> f16
+fn quadSwapDiagonal_2be5e7() -> f16{
+  var arg_0 = 1.h;
+  var res: f16 = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..836ee38
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapDiagonal_2be5e7() {
+  float16_t arg_0 = float16_t(1.0h);
+  float16_t res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cd268d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapDiagonal_2be5e7() {
+  float16_t arg_0 = float16_t(1.0h);
+  float16_t res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapDiagonal_2be5e7());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.glsl
new file mode 100644
index 0000000..6e0d99d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.msl
new file mode 100644
index 0000000..caff089
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..9655b34
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.spvasm
@@ -0,0 +1,65 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_2be5e7 "quadSwapDiagonal_2be5e7"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+%tint_symbol_1 = OpTypeStruct %half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %half
+%_ptr_Function_half = OpTypePointer Function %half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_2be5e7 = OpFunction %half None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function
+        %res = OpVariable %_ptr_Function_half Function
+               OpStore %arg_0 %half_0x1p_0
+         %11 = OpLoad %half %arg_0
+         %12 = OpGroupNonUniformQuadSwap %half %uint_3 %11 %uint_2
+               OpStore %res %12
+         %17 = OpLoad %half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %half %quadSwapDiagonal_2be5e7
+         %23 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %half %quadSwapDiagonal_2be5e7
+         %29 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..14f6397
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/2be5e7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapDiagonal_2be5e7() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_2be5e7();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl
new file mode 100644
index 0000000..621dbf8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+
+// fn quadSwapDiagonal(e: vec<4, f32>) -> vec<4, f32>
+fn quadSwapDiagonal_331804() -> vec4<f32>{
+  var arg_0 = vec4<f32>(1.f);
+  var res: vec4<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bfdd82d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapDiagonal_331804() {
+  float4 arg_0 = (1.0f).xxxx;
+  float4 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a8239d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapDiagonal_331804() {
+  float4 arg_0 = (1.0f).xxxx;
+  float4 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_331804()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.glsl
new file mode 100644
index 0000000..9a9d898
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.msl
new file mode 100644
index 0000000..f6d8235
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.spvasm
new file mode 100644
index 0000000..6b718aa3
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_331804 "quadSwapDiagonal_331804"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%tint_symbol_1 = OpTypeStruct %v4float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_331804 = OpFunction %v4float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4float Function
+        %res = OpVariable %_ptr_Function_v4float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4float %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v4float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %quadSwapDiagonal_331804
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %quadSwapDiagonal_331804
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.wgsl
new file mode 100644
index 0000000..deebf42
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/331804.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapDiagonal_331804() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_331804();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl
new file mode 100644
index 0000000..fd3474d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+
+// fn quadSwapDiagonal(e: vec<2, u32>) -> vec<2, u32>
+fn quadSwapDiagonal_348173() -> vec2<u32>{
+  var arg_0 = vec2<u32>(1u);
+  var res: vec2<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..00d8337
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapDiagonal_348173() {
+  uint2 arg_0 = (1u).xx;
+  uint2 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..302cbe4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapDiagonal_348173() {
+  uint2 arg_0 = (1u).xx;
+  uint2 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_348173()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.glsl
new file mode 100644
index 0000000..55e170a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.msl
new file mode 100644
index 0000000..0c54c46
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.spvasm
new file mode 100644
index 0000000..410745e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_348173 "quadSwapDiagonal_348173"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%tint_symbol_1 = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v2uint %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_348173 = OpFunction %v2uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2uint Function
+        %res = OpVariable %_ptr_Function_v2uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2uint %uint_3 %13 %uint_2
+               OpStore %res %14
+         %18 = OpLoad %v2uint %res
+               OpReturnValue %18
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %22 = OpLabel
+         %23 = OpFunctionCall %v2uint %quadSwapDiagonal_348173
+         %24 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %24 %23
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %28 = OpLabel
+         %29 = OpFunctionCall %v2uint %quadSwapDiagonal_348173
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.wgsl
new file mode 100644
index 0000000..d7bd6f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/348173.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapDiagonal_348173() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_348173();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl
new file mode 100644
index 0000000..b4e6fc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+
+// fn quadSwapDiagonal(e: f32) -> f32
+fn quadSwapDiagonal_486196() -> f32{
+  var arg_0 = 1.f;
+  var res: f32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..58c011f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapDiagonal_486196() {
+  float arg_0 = 1.0f;
+  float res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0790494
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapDiagonal_486196() {
+  float arg_0 = 1.0f;
+  float res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_486196()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.glsl
new file mode 100644
index 0000000..b7f1060
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.msl
new file mode 100644
index 0000000..2b6bc33
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.spvasm
new file mode 100644
index 0000000..19a3e5b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_486196 "quadSwapDiagonal_486196"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+%tint_symbol_1 = OpTypeStruct %float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %float
+%_ptr_Function_float = OpTypePointer Function %float
+    %float_1 = OpConstant %float 1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_486196 = OpFunction %float None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_float Function
+        %res = OpVariable %_ptr_Function_float Function
+               OpStore %arg_0 %float_1
+         %11 = OpLoad %float %arg_0
+         %12 = OpGroupNonUniformQuadSwap %float %uint_3 %11 %uint_2
+               OpStore %res %12
+         %17 = OpLoad %float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %float %quadSwapDiagonal_486196
+         %23 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %float %quadSwapDiagonal_486196
+         %29 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.wgsl
new file mode 100644
index 0000000..16ec06d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/486196.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapDiagonal_486196() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_486196();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl
new file mode 100644
index 0000000..2020f3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+
+// fn quadSwapDiagonal(e: u32) -> u32
+fn quadSwapDiagonal_730e40() -> u32{
+  var arg_0 = 1u;
+  var res: u32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fafe980
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapDiagonal_730e40() {
+  uint arg_0 = 1u;
+  uint res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9cb25cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapDiagonal_730e40() {
+  uint arg_0 = 1u;
+  uint res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_730e40()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.glsl
new file mode 100644
index 0000000..944f253
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.msl
new file mode 100644
index 0000000..99a562a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.spvasm
new file mode 100644
index 0000000..9f5e78d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.spvasm
@@ -0,0 +1,61 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_730e40 "quadSwapDiagonal_730e40"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+%tint_symbol_1 = OpTypeStruct %uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+     %uint_1 = OpConstant %uint 1
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_730e40 = OpFunction %uint None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_uint Function
+        %res = OpVariable %_ptr_Function_uint Function
+               OpStore %arg_0 %uint_1
+         %11 = OpLoad %uint %arg_0
+         %12 = OpGroupNonUniformQuadSwap %uint %uint_3 %11 %uint_2
+               OpStore %res %12
+         %16 = OpLoad %uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %uint %quadSwapDiagonal_730e40
+         %22 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %26 = OpLabel
+         %27 = OpFunctionCall %uint %quadSwapDiagonal_730e40
+         %28 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.wgsl
new file mode 100644
index 0000000..fd9915f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/730e40.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapDiagonal_730e40() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_730e40();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl
new file mode 100644
index 0000000..113d03b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+
+// fn quadSwapDiagonal(e: vec<2, f32>) -> vec<2, f32>
+fn quadSwapDiagonal_8077c8() -> vec2<f32>{
+  var arg_0 = vec2<f32>(1.f);
+  var res: vec2<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..35ed48a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapDiagonal_8077c8() {
+  float2 arg_0 = (1.0f).xx;
+  float2 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59e69fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapDiagonal_8077c8() {
+  float2 arg_0 = (1.0f).xx;
+  float2 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_8077c8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.glsl
new file mode 100644
index 0000000..63e81ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.msl
new file mode 100644
index 0000000..a4bb005
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.spvasm
new file mode 100644
index 0000000..e909489
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_8077c8 "quadSwapDiagonal_8077c8"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v2float = OpTypeVector %float 2
+%tint_symbol_1 = OpTypeStruct %v2float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v2float %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_8077c8 = OpFunction %v2float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2float Function
+        %res = OpVariable %_ptr_Function_v2float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2float %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v2float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2float %quadSwapDiagonal_8077c8
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v2float %quadSwapDiagonal_8077c8
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.wgsl
new file mode 100644
index 0000000..aaaaff9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/8077c8.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapDiagonal_8077c8() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_8077c8();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl
new file mode 100644
index 0000000..f147fb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+
+// fn quadSwapDiagonal(e: vec<3, u32>) -> vec<3, u32>
+fn quadSwapDiagonal_856536() -> vec3<u32>{
+  var arg_0 = vec3<u32>(1u);
+  var res: vec3<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a7ce8cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapDiagonal_856536() {
+  uint3 arg_0 = (1u).xxx;
+  uint3 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..58f10dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapDiagonal_856536() {
+  uint3 arg_0 = (1u).xxx;
+  uint3 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_856536()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.glsl
new file mode 100644
index 0000000..d0f9f4e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.msl
new file mode 100644
index 0000000..12966e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.spvasm
new file mode 100644
index 0000000..a0db7e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_856536 "quadSwapDiagonal_856536"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%tint_symbol_1 = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_856536 = OpFunction %v3uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3uint Function
+        %res = OpVariable %_ptr_Function_v3uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3uint %uint_3 %13 %uint_2
+               OpStore %res %14
+         %18 = OpLoad %v3uint %res
+               OpReturnValue %18
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %22 = OpLabel
+         %23 = OpFunctionCall %v3uint %quadSwapDiagonal_856536
+         %24 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %24 %23
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %28 = OpLabel
+         %29 = OpFunctionCall %v3uint %quadSwapDiagonal_856536
+         %30 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.wgsl
new file mode 100644
index 0000000..3960924
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/856536.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapDiagonal_856536() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_856536();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl
new file mode 100644
index 0000000..f35aa5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+
+// fn quadSwapDiagonal(e: i32) -> i32
+fn quadSwapDiagonal_9ccb38() -> i32{
+  var arg_0 = 1i;
+  var res: i32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d3175b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapDiagonal_9ccb38() {
+  int arg_0 = 1;
+  int res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..22a98a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapDiagonal_9ccb38() {
+  int arg_0 = 1;
+  int res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapDiagonal_9ccb38()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.glsl
new file mode 100644
index 0000000..fa01cb2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.msl
new file mode 100644
index 0000000..d4e90a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.spvasm
new file mode 100644
index 0000000..7dd2b79
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_9ccb38 "quadSwapDiagonal_9ccb38"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+%tint_symbol_1 = OpTypeStruct %int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %int
+%_ptr_Function_int = OpTypePointer Function %int
+      %int_1 = OpConstant %int 1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_9ccb38 = OpFunction %int None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_int Function
+        %res = OpVariable %_ptr_Function_int Function
+               OpStore %arg_0 %int_1
+         %11 = OpLoad %int %arg_0
+         %12 = OpGroupNonUniformQuadSwap %int %uint_3 %11 %uint_2
+               OpStore %res %12
+         %17 = OpLoad %int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %int %quadSwapDiagonal_9ccb38
+         %23 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %int %quadSwapDiagonal_9ccb38
+         %29 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.wgsl
new file mode 100644
index 0000000..3b45621
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/9ccb38.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapDiagonal_9ccb38() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_9ccb38();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl
new file mode 100644
index 0000000..4955a73
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+
+// fn quadSwapDiagonal(e: vec<2, i32>) -> vec<2, i32>
+fn quadSwapDiagonal_a090b0() -> vec2<i32>{
+  var arg_0 = vec2<i32>(1i);
+  var res: vec2<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7c1f1f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapDiagonal_a090b0() {
+  int2 arg_0 = (1).xx;
+  int2 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a81ea5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapDiagonal_a090b0() {
+  int2 arg_0 = (1).xx;
+  int2 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapDiagonal_a090b0()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.glsl
new file mode 100644
index 0000000..fb1764d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.msl
new file mode 100644
index 0000000..f43fdc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..16842fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_a090b0 "quadSwapDiagonal_a090b0"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%tint_symbol_1 = OpTypeStruct %v2int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2int
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_a090b0 = OpFunction %v2int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2int Function
+        %res = OpVariable %_ptr_Function_v2int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2int %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v2int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2int %quadSwapDiagonal_a090b0
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v2int %quadSwapDiagonal_a090b0
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..f9efa34
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a090b0.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapDiagonal_a090b0() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a090b0();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl
new file mode 100644
index 0000000..2efbcc9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+
+// fn quadSwapDiagonal(e: vec<4, i32>) -> vec<4, i32>
+fn quadSwapDiagonal_a665b1() -> vec4<i32>{
+  var arg_0 = vec4<i32>(1i);
+  var res: vec4<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b38f498
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapDiagonal_a665b1() {
+  int4 arg_0 = (1).xxxx;
+  int4 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..06b6416
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapDiagonal_a665b1() {
+  int4 arg_0 = (1).xxxx;
+  int4 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_a665b1()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.glsl
new file mode 100644
index 0000000..6944799
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.msl
new file mode 100644
index 0000000..6faeab0
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..17b7aab
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_a665b1 "quadSwapDiagonal_a665b1"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%tint_symbol_1 = OpTypeStruct %v4int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_a665b1 = OpFunction %v4int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4int Function
+        %res = OpVariable %_ptr_Function_v4int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4int %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v4int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4int %quadSwapDiagonal_a665b1
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4int %quadSwapDiagonal_a665b1
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..0bdbbea
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a665b1.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapDiagonal_a665b1() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a665b1();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl
new file mode 100644
index 0000000..6a1d1c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+
+// fn quadSwapDiagonal(e: vec<3, i32>) -> vec<3, i32>
+fn quadSwapDiagonal_a82e1d() -> vec3<i32>{
+  var arg_0 = vec3<i32>(1i);
+  var res: vec3<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ac6802c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapDiagonal_a82e1d() {
+  int3 arg_0 = (1).xxx;
+  int3 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f1a34c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapDiagonal_a82e1d() {
+  int3 arg_0 = (1).xxx;
+  int3 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_a82e1d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.glsl
new file mode 100644
index 0000000..7fa38d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.msl
new file mode 100644
index 0000000..f3764a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.spvasm
new file mode 100644
index 0000000..f48f5db
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_a82e1d "quadSwapDiagonal_a82e1d"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%tint_symbol_1 = OpTypeStruct %v3int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3int
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_a82e1d = OpFunction %v3int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3int Function
+        %res = OpVariable %_ptr_Function_v3int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3int %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v3int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3int %quadSwapDiagonal_a82e1d
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v3int %quadSwapDiagonal_a82e1d
+         %31 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.wgsl
new file mode 100644
index 0000000..aa90dcd
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/a82e1d.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapDiagonal_a82e1d() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_a82e1d();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl
new file mode 100644
index 0000000..e45cb78
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+
+// fn quadSwapDiagonal(e: vec<4, f16>) -> vec<4, f16>
+fn quadSwapDiagonal_af19a5() -> vec4<f16>{
+  var arg_0 = vec4<f16>(1.h);
+  var res: vec4<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..32524b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapDiagonal_af19a5() {
+  vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
+  vector<float16_t, 4> res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3704502
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapDiagonal_af19a5() {
+  vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
+  vector<float16_t, 4> res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapDiagonal_af19a5());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.glsl
new file mode 100644
index 0000000..9199c03
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.msl
new file mode 100644
index 0000000..031f680
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.spvasm
new file mode 100644
index 0000000..4b2660d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_af19a5 "quadSwapDiagonal_af19a5"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+%tint_symbol_1 = OpTypeStruct %v4half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_af19a5 = OpFunction %v4half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function
+        %res = OpVariable %_ptr_Function_v4half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4half %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v4half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4half %quadSwapDiagonal_af19a5
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4half %quadSwapDiagonal_af19a5
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.wgsl
new file mode 100644
index 0000000..7819ab5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/af19a5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapDiagonal_af19a5() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_af19a5();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl
new file mode 100644
index 0000000..d2ad895
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+
+// fn quadSwapDiagonal(e: vec<3, f32>) -> vec<3, f32>
+fn quadSwapDiagonal_b905fc() -> vec3<f32>{
+  var arg_0 = vec3<f32>(1.f);
+  var res: vec3<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69fb441
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapDiagonal_b905fc() {
+  float3 arg_0 = (1.0f).xxx;
+  float3 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..830b1d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapDiagonal_b905fc() {
+  float3 arg_0 = (1.0f).xxx;
+  float3 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapDiagonal_b905fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.glsl
new file mode 100644
index 0000000..64f7c45
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.msl
new file mode 100644
index 0000000..c26ec22
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..3913a0f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_b905fc "quadSwapDiagonal_b905fc"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v3float = OpTypeVector %float 3
+%tint_symbol_1 = OpTypeStruct %v3float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_b905fc = OpFunction %v3float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3float Function
+        %res = OpVariable %_ptr_Function_v3float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3float %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v3float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3float %quadSwapDiagonal_b905fc
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v3float %quadSwapDiagonal_b905fc
+         %31 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..82818b6
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/b905fc.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapDiagonal_b905fc() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_b905fc();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl
new file mode 100644
index 0000000..91746ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+
+// fn quadSwapDiagonal(e: vec<4, u32>) -> vec<4, u32>
+fn quadSwapDiagonal_c31636() -> vec4<u32>{
+  var arg_0 = vec4<u32>(1u);
+  var res: vec4<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f1ef894
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapDiagonal_c31636() {
+  uint4 arg_0 = (1u).xxxx;
+  uint4 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6ee12ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapDiagonal_c31636() {
+  uint4 arg_0 = (1u).xxxx;
+  uint4 res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapDiagonal_c31636()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.glsl
new file mode 100644
index 0000000..050391a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.msl
new file mode 100644
index 0000000..58dc97c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.spvasm
new file mode 100644
index 0000000..484b2a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_c31636 "quadSwapDiagonal_c31636"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v4uint = OpTypeVector %uint 4
+%tint_symbol_1 = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_c31636 = OpFunction %v4uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4uint Function
+        %res = OpVariable %_ptr_Function_v4uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4uint %uint_3 %13 %uint_2
+               OpStore %res %14
+         %18 = OpLoad %v4uint %res
+               OpReturnValue %18
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %22 = OpLabel
+         %23 = OpFunctionCall %v4uint %quadSwapDiagonal_c31636
+         %24 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %24 %23
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4uint %quadSwapDiagonal_c31636
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.wgsl
new file mode 100644
index 0000000..7860678
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/c31636.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapDiagonal_c31636() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_c31636();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl
new file mode 100644
index 0000000..0e4ed5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+
+// fn quadSwapDiagonal(e: vec<3, f16>) -> vec<3, f16>
+fn quadSwapDiagonal_e4bec8() -> vec3<f16>{
+  var arg_0 = vec3<f16>(1.h);
+  var res: vec3<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..566f9b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapDiagonal_e4bec8() {
+  vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
+  vector<float16_t, 3> res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d7e1ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapDiagonal_e4bec8() {
+  vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
+  vector<float16_t, 3> res = QuadReadAcrossDiagonal(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapDiagonal_e4bec8());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.glsl
new file mode 100644
index 0000000..5d7e996
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.ir.msl
new file mode 100644
index 0000000..f05ef8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapDiagonal
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.msl
new file mode 100644
index 0000000..5ae38ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+Failed to generate: error: Unknown import method: quadSwapDiagonal
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.spvasm
new file mode 100644
index 0000000..9ac721d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapDiagonal_e4bec8 "quadSwapDiagonal_e4bec8"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+%tint_symbol_1 = OpTypeStruct %v3half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_2 = OpConstant %uint 2
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
+     %uint_0 = OpConstant %uint 0
+%quadSwapDiagonal_e4bec8 = OpFunction %v3half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function
+        %res = OpVariable %_ptr_Function_v3half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3half %uint_3 %13 %uint_2
+               OpStore %res %14
+         %19 = OpLoad %v3half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3half %quadSwapDiagonal_e4bec8
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v3half %quadSwapDiagonal_e4bec8
+         %31 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.wgsl
new file mode 100644
index 0000000..44eef05
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapDiagonal/e4bec8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapDiagonal_e4bec8() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapDiagonal(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapDiagonal_e4bec8();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl
new file mode 100644
index 0000000..e2ab367
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+
+// fn quadSwapX(e: vec<4, f16>) -> vec<4, f16>
+fn quadSwapX_02834c() -> vec4<f16>{
+  var arg_0 = vec4<f16>(1.h);
+  var res: vec4<f16> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c29dceb
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapX_02834c() {
+  vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
+  vector<float16_t, 4> res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..84b9e62
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapX_02834c() {
+  vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
+  vector<float16_t, 4> res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapX_02834c());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.glsl
new file mode 100644
index 0000000..4e65ecd
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.msl
new file mode 100644
index 0000000..2a0e22d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.spvasm
new file mode 100644
index 0000000..0b25caf
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.spvasm
@@ -0,0 +1,66 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_02834c "quadSwapX_02834c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+%tint_symbol_1 = OpTypeStruct %v4half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
+%quadSwapX_02834c = OpFunction %v4half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function
+        %res = OpVariable %_ptr_Function_v4half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4half %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v4half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4half %quadSwapX_02834c
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4half %quadSwapX_02834c
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.wgsl
new file mode 100644
index 0000000..dadc0dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/02834c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapX_02834c() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_02834c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_02834c();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl
new file mode 100644
index 0000000..f6d4dd9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+
+// fn quadSwapX(e: vec<3, i32>) -> vec<3, i32>
+fn quadSwapX_053f3b() -> vec3<i32>{
+  var arg_0 = vec3<i32>(1i);
+  var res: vec3<i32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f61b904
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapX_053f3b() {
+  int3 arg_0 = (1).xxx;
+  int3 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..631b5bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapX_053f3b() {
+  int3 arg_0 = (1).xxx;
+  int3 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_053f3b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.glsl
new file mode 100644
index 0000000..7abb876
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.msl
new file mode 100644
index 0000000..c782b8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..2a8a218
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_053f3b "quadSwapX_053f3b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%tint_symbol_1 = OpTypeStruct %v3int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3int
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
+%quadSwapX_053f3b = OpFunction %v3int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3int Function
+        %res = OpVariable %_ptr_Function_v3int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3int %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v3int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3int %quadSwapX_053f3b
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v3int %quadSwapX_053f3b
+         %30 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..dacac1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/053f3b.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapX_053f3b() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_053f3b();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl
new file mode 100644
index 0000000..4416e00
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+
+// fn quadSwapX(e: vec<4, u32>) -> vec<4, u32>
+fn quadSwapX_07f1fc() -> vec4<u32>{
+  var arg_0 = vec4<u32>(1u);
+  var res: vec4<u32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..65ce80f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapX_07f1fc() {
+  uint4 arg_0 = (1u).xxxx;
+  uint4 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..171828b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapX_07f1fc() {
+  uint4 arg_0 = (1u).xxxx;
+  uint4 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_07f1fc()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.glsl
new file mode 100644
index 0000000..c71f508
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.msl
new file mode 100644
index 0000000..ae48f10
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..9b5c456
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_07f1fc "quadSwapX_07f1fc"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v4uint = OpTypeVector %uint 4
+%tint_symbol_1 = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+%quadSwapX_07f1fc = OpFunction %v4uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4uint Function
+        %res = OpVariable %_ptr_Function_v4uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4uint %uint_3 %13 %uint_0
+               OpStore %res %14
+         %18 = OpLoad %v4uint %res
+               OpReturnValue %18
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %22 = OpLabel
+         %23 = OpFunctionCall %v4uint %quadSwapX_07f1fc
+         %24 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %24 %23
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4uint %quadSwapX_07f1fc
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..3452a39
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/07f1fc.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapX_07f1fc() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_07f1fc();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl
new file mode 100644
index 0000000..b1dc441
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+
+// fn quadSwapX(e: vec<3, f32>) -> vec<3, f32>
+fn quadSwapX_150d6f() -> vec3<f32>{
+  var arg_0 = vec3<f32>(1.f);
+  var res: vec3<f32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b45991c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapX_150d6f() {
+  float3 arg_0 = (1.0f).xxx;
+  float3 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..71535d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapX_150d6f() {
+  float3 arg_0 = (1.0f).xxx;
+  float3 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_150d6f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.glsl
new file mode 100644
index 0000000..99450e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.msl
new file mode 100644
index 0000000..c98ab23
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.spvasm
new file mode 100644
index 0000000..a585c90
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_150d6f "quadSwapX_150d6f"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v3float = OpTypeVector %float 3
+%tint_symbol_1 = OpTypeStruct %v3float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
+%quadSwapX_150d6f = OpFunction %v3float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3float Function
+        %res = OpVariable %_ptr_Function_v3float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3float %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v3float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3float %quadSwapX_150d6f
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v3float %quadSwapX_150d6f
+         %30 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.wgsl
new file mode 100644
index 0000000..52df718
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/150d6f.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapX_150d6f() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_150d6f();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl
new file mode 100644
index 0000000..4a7fd3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+
+// fn quadSwapX(e: vec<2, u32>) -> vec<2, u32>
+fn quadSwapX_19f8ce() -> vec2<u32>{
+  var arg_0 = vec2<u32>(1u);
+  var res: vec2<u32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bdf7982
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapX_19f8ce() {
+  uint2 arg_0 = (1u).xx;
+  uint2 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5d49500
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapX_19f8ce() {
+  uint2 arg_0 = (1u).xx;
+  uint2 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_19f8ce()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.glsl
new file mode 100644
index 0000000..0a9e118
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.msl
new file mode 100644
index 0000000..3028af2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..39d2cd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_19f8ce "quadSwapX_19f8ce"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%tint_symbol_1 = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v2uint %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+%quadSwapX_19f8ce = OpFunction %v2uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2uint Function
+        %res = OpVariable %_ptr_Function_v2uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2uint %uint_3 %13 %uint_0
+               OpStore %res %14
+         %18 = OpLoad %v2uint %res
+               OpReturnValue %18
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %22 = OpLabel
+         %23 = OpFunctionCall %v2uint %quadSwapX_19f8ce
+         %24 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %24 %23
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2uint %quadSwapX_19f8ce
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..79a0e12
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/19f8ce.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapX_19f8ce() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_19f8ce();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl
new file mode 100644
index 0000000..965b67d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+
+// fn quadSwapX(e: i32) -> i32
+fn quadSwapX_1e1086() -> i32{
+  var arg_0 = 1i;
+  var res: i32 = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b56f754
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapX_1e1086() {
+  int arg_0 = 1;
+  int res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0661620
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapX_1e1086() {
+  int arg_0 = 1;
+  int res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_1e1086()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.glsl
new file mode 100644
index 0000000..e23a796
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.msl
new file mode 100644
index 0000000..301123e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.spvasm
new file mode 100644
index 0000000..ead2cd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.spvasm
@@ -0,0 +1,61 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_1e1086 "quadSwapX_1e1086"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+%tint_symbol_1 = OpTypeStruct %int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %int
+%_ptr_Function_int = OpTypePointer Function %int
+      %int_1 = OpConstant %int 1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
+%quadSwapX_1e1086 = OpFunction %int None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_int Function
+        %res = OpVariable %_ptr_Function_int Function
+               OpStore %arg_0 %int_1
+         %11 = OpLoad %int %arg_0
+         %12 = OpGroupNonUniformQuadSwap %int %uint_3 %11 %uint_0
+               OpStore %res %12
+         %17 = OpLoad %int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %int %quadSwapX_1e1086
+         %23 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %int %quadSwapX_1e1086
+         %28 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.wgsl
new file mode 100644
index 0000000..395a2ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/1e1086.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapX_1e1086() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_1e1086();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl
new file mode 100644
index 0000000..cce9706
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+
+// fn quadSwapX(e: vec<4, f32>) -> vec<4, f32>
+fn quadSwapX_69af6a() -> vec4<f32>{
+  var arg_0 = vec4<f32>(1.f);
+  var res: vec4<f32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..641c996
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapX_69af6a() {
+  float4 arg_0 = (1.0f).xxxx;
+  float4 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1674a1e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapX_69af6a() {
+  float4 arg_0 = (1.0f).xxxx;
+  float4 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_69af6a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.glsl
new file mode 100644
index 0000000..a786d3a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.msl
new file mode 100644
index 0000000..4befc2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.spvasm
new file mode 100644
index 0000000..3fbe52c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_69af6a "quadSwapX_69af6a"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%tint_symbol_1 = OpTypeStruct %v4float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+%quadSwapX_69af6a = OpFunction %v4float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4float Function
+        %res = OpVariable %_ptr_Function_v4float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4float %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v4float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %quadSwapX_69af6a
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %quadSwapX_69af6a
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.wgsl
new file mode 100644
index 0000000..7a8f376
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/69af6a.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapX_69af6a() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_69af6a();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl
new file mode 100644
index 0000000..5d8f555
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+
+// fn quadSwapX(e: u32) -> u32
+fn quadSwapX_8203ad() -> u32{
+  var arg_0 = 1u;
+  var res: u32 = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3414a35
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapX_8203ad() {
+  uint arg_0 = 1u;
+  uint res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f200126
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapX_8203ad() {
+  uint arg_0 = 1u;
+  uint res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_8203ad()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.glsl
new file mode 100644
index 0000000..d37375f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.msl
new file mode 100644
index 0000000..e13c587
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.spvasm
new file mode 100644
index 0000000..8d2f472
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_8203ad "quadSwapX_8203ad"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+%tint_symbol_1 = OpTypeStruct %uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+     %uint_1 = OpConstant %uint 1
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %19 = OpTypeFunction %void
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+%quadSwapX_8203ad = OpFunction %uint None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_uint Function
+        %res = OpVariable %_ptr_Function_uint Function
+               OpStore %arg_0 %uint_1
+         %11 = OpLoad %uint %arg_0
+         %12 = OpGroupNonUniformQuadSwap %uint %uint_3 %11 %uint_0
+               OpStore %res %12
+         %16 = OpLoad %uint %res
+               OpReturnValue %16
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %19
+         %20 = OpLabel
+         %21 = OpFunctionCall %uint %quadSwapX_8203ad
+         %22 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %22 %21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %19
+         %25 = OpLabel
+         %26 = OpFunctionCall %uint %quadSwapX_8203ad
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.wgsl
new file mode 100644
index 0000000..8d9579d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/8203ad.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapX_8203ad() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_8203ad();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl
new file mode 100644
index 0000000..be23bbe
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+
+// fn quadSwapX(e: vec<2, f32>) -> vec<2, f32>
+fn quadSwapX_879738() -> vec2<f32>{
+  var arg_0 = vec2<f32>(1.f);
+  var res: vec2<f32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3e96ad1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapX_879738() {
+  float2 arg_0 = (1.0f).xx;
+  float2 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..622f4d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapX_879738() {
+  float2 arg_0 = (1.0f).xx;
+  float2 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_879738()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.glsl
new file mode 100644
index 0000000..4094ba1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/879738.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/879738.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.msl
new file mode 100644
index 0000000..f6b6fb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.spvasm
new file mode 100644
index 0000000..bccc7c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_879738 "quadSwapX_879738"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v2float = OpTypeVector %float 2
+%tint_symbol_1 = OpTypeStruct %v2float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v2float %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
+%quadSwapX_879738 = OpFunction %v2float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2float Function
+        %res = OpVariable %_ptr_Function_v2float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2float %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v2float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2float %quadSwapX_879738
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v2float %quadSwapX_879738
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.wgsl
new file mode 100644
index 0000000..84e0c66
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/879738.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapX_879738() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_879738();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_879738();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl
new file mode 100644
index 0000000..514106c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+
+// fn quadSwapX(e: f32) -> f32
+fn quadSwapX_9bea80() -> f32{
+  var arg_0 = 1.f;
+  var res: f32 = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4bfb51a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapX_9bea80() {
+  float arg_0 = 1.0f;
+  float res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0286319
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapX_9bea80() {
+  float arg_0 = 1.0f;
+  float res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapX_9bea80()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.glsl
new file mode 100644
index 0000000..928a67d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.msl
new file mode 100644
index 0000000..ce807fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.spvasm
new file mode 100644
index 0000000..87a5325
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.spvasm
@@ -0,0 +1,61 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_9bea80 "quadSwapX_9bea80"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+%tint_symbol_1 = OpTypeStruct %float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %float
+%_ptr_Function_float = OpTypePointer Function %float
+    %float_1 = OpConstant %float 1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
+%quadSwapX_9bea80 = OpFunction %float None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_float Function
+        %res = OpVariable %_ptr_Function_float Function
+               OpStore %arg_0 %float_1
+         %11 = OpLoad %float %arg_0
+         %12 = OpGroupNonUniformQuadSwap %float %uint_3 %11 %uint_0
+               OpStore %res %12
+         %17 = OpLoad %float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %float %quadSwapX_9bea80
+         %23 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %float %quadSwapX_9bea80
+         %28 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.wgsl
new file mode 100644
index 0000000..19d69d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/9bea80.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapX_9bea80() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_9bea80();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl
new file mode 100644
index 0000000..9aeb4e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+
+// fn quadSwapX(e: f16) -> f16
+fn quadSwapX_a4e103() -> f16{
+  var arg_0 = 1.h;
+  var res: f16 = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..21f5920
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapX_a4e103() {
+  float16_t arg_0 = float16_t(1.0h);
+  float16_t res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aaef08b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapX_a4e103() {
+  float16_t arg_0 = float16_t(1.0h);
+  float16_t res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapX_a4e103());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.glsl
new file mode 100644
index 0000000..11d3d82
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.msl
new file mode 100644
index 0000000..b3c2afe
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.spvasm
new file mode 100644
index 0000000..5bdcf2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_a4e103 "quadSwapX_a4e103"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+%tint_symbol_1 = OpTypeStruct %half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %half
+%_ptr_Function_half = OpTypePointer Function %half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
+%quadSwapX_a4e103 = OpFunction %half None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function
+        %res = OpVariable %_ptr_Function_half Function
+               OpStore %arg_0 %half_0x1p_0
+         %11 = OpLoad %half %arg_0
+         %12 = OpGroupNonUniformQuadSwap %half %uint_3 %11 %uint_0
+               OpStore %res %12
+         %17 = OpLoad %half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %half %quadSwapX_a4e103
+         %23 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %26 = OpLabel
+         %27 = OpFunctionCall %half %quadSwapX_a4e103
+         %28 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %28 %27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.wgsl
new file mode 100644
index 0000000..908adbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/a4e103.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapX_a4e103() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_a4e103();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl
new file mode 100644
index 0000000..22453a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+
+// fn quadSwapX(e: vec<2, i32>) -> vec<2, i32>
+fn quadSwapX_b1a5fe() -> vec2<i32>{
+  var arg_0 = vec2<i32>(1i);
+  var res: vec2<i32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..641c3bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapX_b1a5fe() {
+  int2 arg_0 = (1).xx;
+  int2 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c54bf8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapX_b1a5fe() {
+  int2 arg_0 = (1).xx;
+  int2 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapX_b1a5fe()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.glsl
new file mode 100644
index 0000000..0e125cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.msl
new file mode 100644
index 0000000..44f175c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c8db84
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_b1a5fe "quadSwapX_b1a5fe"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%tint_symbol_1 = OpTypeStruct %v2int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2int
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
+%quadSwapX_b1a5fe = OpFunction %v2int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2int Function
+        %res = OpVariable %_ptr_Function_v2int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2int %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v2int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2int %quadSwapX_b1a5fe
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v2int %quadSwapX_b1a5fe
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..19cd5ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/b1a5fe.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapX_b1a5fe() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_b1a5fe();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl
new file mode 100644
index 0000000..ffb43d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+
+// fn quadSwapX(e: vec<3, f16>) -> vec<3, f16>
+fn quadSwapX_bc2013() -> vec3<f16>{
+  var arg_0 = vec3<f16>(1.h);
+  var res: vec3<f16> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..89ce80b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapX_bc2013() {
+  vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
+  vector<float16_t, 3> res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9454f54
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapX_bc2013() {
+  vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
+  vector<float16_t, 3> res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapX_bc2013());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.glsl
new file mode 100644
index 0000000..9e76b65
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.msl
new file mode 100644
index 0000000..2a68f31
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.spvasm
new file mode 100644
index 0000000..7492430
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.spvasm
@@ -0,0 +1,66 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_bc2013 "quadSwapX_bc2013"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+%tint_symbol_1 = OpTypeStruct %v3half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
+%quadSwapX_bc2013 = OpFunction %v3half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function
+        %res = OpVariable %_ptr_Function_v3half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3half %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v3half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3half %quadSwapX_bc2013
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v3half %quadSwapX_bc2013
+         %30 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.wgsl
new file mode 100644
index 0000000..2e4379f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bc2013.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapX_bc2013() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bc2013();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl
new file mode 100644
index 0000000..f5a6742
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+
+// fn quadSwapX(e: vec<3, u32>) -> vec<3, u32>
+fn quadSwapX_bddb9f() -> vec3<u32>{
+  var arg_0 = vec3<u32>(1u);
+  var res: vec3<u32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a73ae79
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapX_bddb9f() {
+  uint3 arg_0 = (1u).xxx;
+  uint3 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..134d775
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapX_bddb9f() {
+  uint3 arg_0 = (1u).xxx;
+  uint3 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapX_bddb9f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.glsl
new file mode 100644
index 0000000..646e61d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.msl
new file mode 100644
index 0000000..50b5921
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.spvasm
new file mode 100644
index 0000000..c33fdb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_bddb9f "quadSwapX_bddb9f"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%tint_symbol_1 = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+%quadSwapX_bddb9f = OpFunction %v3uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3uint Function
+        %res = OpVariable %_ptr_Function_v3uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3uint %uint_3 %13 %uint_0
+               OpStore %res %14
+         %18 = OpLoad %v3uint %res
+               OpReturnValue %18
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %22 = OpLabel
+         %23 = OpFunctionCall %v3uint %quadSwapX_bddb9f
+         %24 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %24 %23
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3uint %quadSwapX_bddb9f
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.wgsl
new file mode 100644
index 0000000..2ea403a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/bddb9f.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapX_bddb9f() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_bddb9f();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl
new file mode 100644
index 0000000..46cd1c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+
+// fn quadSwapX(e: vec<2, f16>) -> vec<2, f16>
+fn quadSwapX_d60cec() -> vec2<f16>{
+  var arg_0 = vec2<f16>(1.h);
+  var res: vec2<f16> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8bce732
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapX_d60cec() {
+  vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
+  vector<float16_t, 2> res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3526320
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapX_d60cec() {
+  vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
+  vector<float16_t, 2> res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapX_d60cec());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.glsl
new file mode 100644
index 0000000..bf524c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.msl
new file mode 100644
index 0000000..4dcc1b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.spvasm
new file mode 100644
index 0000000..e46637a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.spvasm
@@ -0,0 +1,66 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_d60cec "quadSwapX_d60cec"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+%tint_symbol_1 = OpTypeStruct %v2half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
+%quadSwapX_d60cec = OpFunction %v2half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function
+        %res = OpVariable %_ptr_Function_v2half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2half %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v2half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2half %quadSwapX_d60cec
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v2half %quadSwapX_d60cec
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca343db
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/d60cec.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapX_d60cec() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_d60cec();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl
new file mode 100644
index 0000000..c649d1a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+
+// fn quadSwapX(e: vec<4, i32>) -> vec<4, i32>
+fn quadSwapX_edfa1f() -> vec4<i32>{
+  var arg_0 = vec4<i32>(1i);
+  var res: vec4<i32> = quadSwapX(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..99e0f2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapX_edfa1f() {
+  int4 arg_0 = (1).xxxx;
+  int4 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d021e13
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapX_edfa1f() {
+  int4 arg_0 = (1).xxxx;
+  int4 res = QuadReadAcrossX(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapX_edfa1f()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.glsl
new file mode 100644
index 0000000..a9781c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.ir.msl
new file mode 100644
index 0000000..b4d3336
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapX
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.msl
new file mode 100644
index 0000000..cd38d05
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+Failed to generate: error: Unknown import method: quadSwapX
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.spvasm
new file mode 100644
index 0000000..922f9fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.spvasm
@@ -0,0 +1,63 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapX_edfa1f "quadSwapX_edfa1f"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%tint_symbol_1 = OpTypeStruct %v4int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_0 = OpConstant %uint 0
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+%quadSwapX_edfa1f = OpFunction %v4int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4int Function
+        %res = OpVariable %_ptr_Function_v4int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4int %uint_3 %13 %uint_0
+               OpStore %res %14
+         %19 = OpLoad %v4int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4int %quadSwapX_edfa1f
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4int %quadSwapX_edfa1f
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %30 %29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.wgsl
new file mode 100644
index 0000000..304a1a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapX/edfa1f.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapX_edfa1f() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapX(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapX_edfa1f();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl
new file mode 100644
index 0000000..a8f1617
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+
+// fn quadSwapY(e: vec<3, u32>) -> vec<3, u32>
+fn quadSwapY_06a67c() -> vec3<u32>{
+  var arg_0 = vec3<u32>(1u);
+  var res: vec3<u32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7470c1e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapY_06a67c() {
+  uint3 arg_0 = (1u).xxx;
+  uint3 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b629697
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint3 quadSwapY_06a67c() {
+  uint3 arg_0 = (1u).xxx;
+  uint3 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_06a67c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.glsl
new file mode 100644
index 0000000..b34639e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.msl
new file mode 100644
index 0000000..37268e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.spvasm
new file mode 100644
index 0000000..7d19826
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_06a67c "quadSwapY_06a67c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%tint_symbol_1 = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_06a67c = OpFunction %v3uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3uint Function
+        %res = OpVariable %_ptr_Function_v3uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3uint %uint_3 %13 %uint_1
+               OpStore %res %14
+         %17 = OpLoad %v3uint %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v3uint %quadSwapY_06a67c
+         %23 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v3uint %quadSwapY_06a67c
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.wgsl
new file mode 100644
index 0000000..4ee5632
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/06a67c.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+fn quadSwapY_06a67c() -> vec3<u32> {
+  var arg_0 = vec3<u32>(1u);
+  var res : vec3<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_06a67c();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl
new file mode 100644
index 0000000..9d679bb
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+
+// fn quadSwapY(e: u32) -> u32
+fn quadSwapY_0c4938() -> u32{
+  var arg_0 = 1u;
+  var res: u32 = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5d1b3ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapY_0c4938() {
+  uint arg_0 = 1u;
+  uint res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1cccaaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint quadSwapY_0c4938() {
+  uint arg_0 = 1u;
+  uint res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_0c4938()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.glsl
new file mode 100644
index 0000000..d5ca4f60
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.msl
new file mode 100644
index 0000000..e9a080c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.spvasm
new file mode 100644
index 0000000..f999b60
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.spvasm
@@ -0,0 +1,60 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 28
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_0c4938 "quadSwapY_0c4938"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+%tint_symbol_1 = OpTypeStruct %uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+     %uint_1 = OpConstant %uint 1
+     %uint_3 = OpConstant %uint 3
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_0c4938 = OpFunction %uint None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_uint Function
+        %res = OpVariable %_ptr_Function_uint Function
+               OpStore %arg_0 %uint_1
+         %11 = OpLoad %uint %arg_0
+         %12 = OpGroupNonUniformQuadSwap %uint %uint_3 %11 %uint_1
+               OpStore %res %12
+         %15 = OpLoad %uint %res
+               OpReturnValue %15
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %19 = OpLabel
+         %20 = OpFunctionCall %uint %quadSwapY_0c4938
+         %21 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %21 %20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %25 = OpLabel
+         %26 = OpFunctionCall %uint %quadSwapY_0c4938
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0
+               OpStore %27 %26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.wgsl
new file mode 100644
index 0000000..db1d4b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0c4938.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+fn quadSwapY_0c4938() -> u32 {
+  var arg_0 = 1u;
+  var res : u32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0c4938();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl
new file mode 100644
index 0000000..616ce9a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+
+// fn quadSwapY(e: vec<2, i32>) -> vec<2, i32>
+fn quadSwapY_0d05a8() -> vec2<i32>{
+  var arg_0 = vec2<i32>(1i);
+  var res: vec2<i32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7896731
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapY_0d05a8() {
+  int2 arg_0 = (1).xx;
+  int2 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07aba1d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int2 quadSwapY_0d05a8() {
+  int2 arg_0 = (1).xx;
+  int2 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_0d05a8()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.glsl
new file mode 100644
index 0000000..aaae816
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.msl
new file mode 100644
index 0000000..44a7e21
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.spvasm
new file mode 100644
index 0000000..33f7446
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_0d05a8 "quadSwapY_0d05a8"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%tint_symbol_1 = OpTypeStruct %v2int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2int
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_0d05a8 = OpFunction %v2int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2int Function
+        %res = OpVariable %_ptr_Function_v2int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2int %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v2int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2int %quadSwapY_0d05a8
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v2int %quadSwapY_0d05a8
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.wgsl
new file mode 100644
index 0000000..05f22bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/0d05a8.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<i32>;
+
+fn quadSwapY_0d05a8() -> vec2<i32> {
+  var arg_0 = vec2<i32>(1i);
+  var res : vec2<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_0d05a8();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl
new file mode 100644
index 0000000..70619fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+
+// fn quadSwapY(e: vec<4, i32>) -> vec<4, i32>
+fn quadSwapY_14bb9a() -> vec4<i32>{
+  var arg_0 = vec4<i32>(1i);
+  var res: vec4<i32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c6e5d4b
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapY_14bb9a() {
+  int4 arg_0 = (1).xxxx;
+  int4 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a6d6f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int4 quadSwapY_14bb9a() {
+  int4 arg_0 = (1).xxxx;
+  int4 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_14bb9a()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.glsl
new file mode 100644
index 0000000..9a6155e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.msl
new file mode 100644
index 0000000..3351af6
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.spvasm
new file mode 100644
index 0000000..2798aea
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_14bb9a "quadSwapY_14bb9a"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%tint_symbol_1 = OpTypeStruct %v4int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_14bb9a = OpFunction %v4int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4int Function
+        %res = OpVariable %_ptr_Function_v4int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4int %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v4int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4int %quadSwapY_14bb9a
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4int %quadSwapY_14bb9a
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.wgsl
new file mode 100644
index 0000000..b3c42e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/14bb9a.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+fn quadSwapY_14bb9a() -> vec4<i32> {
+  var arg_0 = vec4<i32>(1i);
+  var res : vec4<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_14bb9a();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl
new file mode 100644
index 0000000..fbd4373
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+
+// fn quadSwapY(e: vec<2, f32>) -> vec<2, f32>
+fn quadSwapY_1f1a06() -> vec2<f32>{
+  var arg_0 = vec2<f32>(1.f);
+  var res: vec2<f32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bcc656e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapY_1f1a06() {
+  float2 arg_0 = (1.0f).xx;
+  float2 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cb091ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float2 quadSwapY_1f1a06() {
+  float2 arg_0 = (1.0f).xx;
+  float2 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_1f1a06()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.glsl
new file mode 100644
index 0000000..2d57eb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.msl
new file mode 100644
index 0000000..8b3b68c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.spvasm
new file mode 100644
index 0000000..2672e03
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_1f1a06 "quadSwapY_1f1a06"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v2float = OpTypeVector %float 2
+%tint_symbol_1 = OpTypeStruct %v2float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v2float %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_1f1a06 = OpFunction %v2float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2float Function
+        %res = OpVariable %_ptr_Function_v2float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2float %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v2float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2float %quadSwapY_1f1a06
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v2float %quadSwapY_1f1a06
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.wgsl
new file mode 100644
index 0000000..036ccc5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/1f1a06.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f32>;
+
+fn quadSwapY_1f1a06() -> vec2<f32> {
+  var arg_0 = vec2<f32>(1.0f);
+  var res : vec2<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_1f1a06();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl
new file mode 100644
index 0000000..52ec603
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+
+// fn quadSwapY(e: vec<3, f16>) -> vec<3, f16>
+fn quadSwapY_264908() -> vec3<f16>{
+  var arg_0 = vec3<f16>(1.h);
+  var res: vec3<f16> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..83db292
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapY_264908() {
+  vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
+  vector<float16_t, 3> res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..528e304
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 3> quadSwapY_264908() {
+  vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
+  vector<float16_t, 3> res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 3> >(0u, quadSwapY_264908());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.glsl
new file mode 100644
index 0000000..3c82c18
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/264908.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/264908.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.msl
new file mode 100644
index 0000000..7d2b700
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.spvasm
new file mode 100644
index 0000000..5d70ff8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_264908 "quadSwapY_264908"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+%tint_symbol_1 = OpTypeStruct %v3half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_264908 = OpFunction %v3half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3half Function
+        %res = OpVariable %_ptr_Function_v3half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3half %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v3half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3half %quadSwapY_264908
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v3half %quadSwapY_264908
+         %31 = OpAccessChain %_ptr_StorageBuffer_v3half %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.wgsl
new file mode 100644
index 0000000..de65d22
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/264908.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f16>;
+
+fn quadSwapY_264908() -> vec3<f16> {
+  var arg_0 = vec3<f16>(1.0h);
+  var res : vec3<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_264908();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_264908();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl
new file mode 100644
index 0000000..4ce4771
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+
+// fn quadSwapY(e: vec<4, f16>) -> vec<4, f16>
+fn quadSwapY_5b2e67() -> vec4<f16>{
+  var arg_0 = vec4<f16>(1.h);
+  var res: vec4<f16> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2596fa0
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapY_5b2e67() {
+  vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
+  vector<float16_t, 4> res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..25e5866
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 4> quadSwapY_5b2e67() {
+  vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
+  vector<float16_t, 4> res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 4> >(0u, quadSwapY_5b2e67());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.glsl
new file mode 100644
index 0000000..f853dba
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.msl
new file mode 100644
index 0000000..a89da2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.spvasm
new file mode 100644
index 0000000..54e2c04
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_5b2e67 "quadSwapY_5b2e67"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+%tint_symbol_1 = OpTypeStruct %v4half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_5b2e67 = OpFunction %v4half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4half Function
+        %res = OpVariable %_ptr_Function_v4half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4half %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v4half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4half %quadSwapY_5b2e67
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4half %quadSwapY_5b2e67
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4half %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.wgsl
new file mode 100644
index 0000000..baa95a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/5b2e67.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>;
+
+fn quadSwapY_5b2e67() -> vec4<f16> {
+  var arg_0 = vec4<f16>(1.0h);
+  var res : vec4<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_5b2e67();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl
new file mode 100644
index 0000000..b90f024
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+
+// fn quadSwapY(e: f32) -> f32
+fn quadSwapY_6f6bc9() -> f32{
+  var arg_0 = 1.f;
+  var res: f32 = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fbb3e25
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapY_6f6bc9() {
+  float arg_0 = 1.0f;
+  float res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b145015
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float quadSwapY_6f6bc9() {
+  float arg_0 = 1.0f;
+  float res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_6f6bc9()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.glsl
new file mode 100644
index 0000000..6e4ebf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.msl
new file mode 100644
index 0000000..badf5af
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.spvasm
new file mode 100644
index 0000000..e22273d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_6f6bc9 "quadSwapY_6f6bc9"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+%tint_symbol_1 = OpTypeStruct %float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %float
+%_ptr_Function_float = OpTypePointer Function %float
+    %float_1 = OpConstant %float 1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_6f6bc9 = OpFunction %float None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_float Function
+        %res = OpVariable %_ptr_Function_float Function
+               OpStore %arg_0 %float_1
+         %11 = OpLoad %float %arg_0
+         %12 = OpGroupNonUniformQuadSwap %float %uint_3 %11 %uint_1
+               OpStore %res %12
+         %17 = OpLoad %float %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %float %quadSwapY_6f6bc9
+         %23 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %float %quadSwapY_6f6bc9
+         %29 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.wgsl
new file mode 100644
index 0000000..e645fc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/6f6bc9.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
+
+fn quadSwapY_6f6bc9() -> f32 {
+  var arg_0 = 1.0f;
+  var res : f32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_6f6bc9();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl
new file mode 100644
index 0000000..1e97585
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+
+// fn quadSwapY(e: f16) -> f16
+fn quadSwapY_9277e9() -> f16{
+  var arg_0 = 1.h;
+  var res: f16 = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a6dc347
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapY_9277e9() {
+  float16_t arg_0 = float16_t(1.0h);
+  float16_t res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ae89049
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float16_t quadSwapY_9277e9() {
+  float16_t arg_0 = float16_t(1.0h);
+  float16_t res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<float16_t>(0u, quadSwapY_9277e9());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.glsl
new file mode 100644
index 0000000..6e2753a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.msl
new file mode 100644
index 0000000..e7d5a05
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..07f2cca
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.spvasm
@@ -0,0 +1,65 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_9277e9 "quadSwapY_9277e9"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+%tint_symbol_1 = OpTypeStruct %half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %half
+%_ptr_Function_half = OpTypePointer Function %half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_9277e9 = OpFunction %half None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_half Function
+        %res = OpVariable %_ptr_Function_half Function
+               OpStore %arg_0 %half_0x1p_0
+         %11 = OpLoad %half %arg_0
+         %12 = OpGroupNonUniformQuadSwap %half %uint_3 %11 %uint_1
+               OpStore %res %12
+         %17 = OpLoad %half %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %half %quadSwapY_9277e9
+         %23 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %half %quadSwapY_9277e9
+         %29 = OpAccessChain %_ptr_StorageBuffer_half %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..776fdda
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/9277e9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : f16;
+
+fn quadSwapY_9277e9() -> f16 {
+  var arg_0 = 1.0h;
+  var res : f16 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_9277e9();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl
new file mode 100644
index 0000000..c2c1940
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+
+// fn quadSwapY(e: i32) -> i32
+fn quadSwapY_94ab6d() -> i32{
+  var arg_0 = 1i;
+  var res: i32 = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4c91050
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapY_94ab6d() {
+  int arg_0 = 1;
+  int res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4daf988
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int quadSwapY_94ab6d() {
+  int arg_0 = 1;
+  int res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store(0u, asuint(quadSwapY_94ab6d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.glsl
new file mode 100644
index 0000000..aeef3f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.msl
new file mode 100644
index 0000000..5d86cb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.spvasm
new file mode 100644
index 0000000..97426ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_94ab6d "quadSwapY_94ab6d"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+%tint_symbol_1 = OpTypeStruct %int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %6 = OpTypeFunction %int
+%_ptr_Function_int = OpTypePointer Function %int
+      %int_1 = OpConstant %int 1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_94ab6d = OpFunction %int None %6
+          %7 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_int Function
+        %res = OpVariable %_ptr_Function_int Function
+               OpStore %arg_0 %int_1
+         %11 = OpLoad %int %arg_0
+         %12 = OpGroupNonUniformQuadSwap %int %uint_3 %11 %uint_1
+               OpStore %res %12
+         %17 = OpLoad %int %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %int %quadSwapY_94ab6d
+         %23 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %int %quadSwapY_94ab6d
+         %29 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.wgsl
new file mode 100644
index 0000000..027b9f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/94ab6d.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;
+
+fn quadSwapY_94ab6d() -> i32 {
+  var arg_0 = 1i;
+  var res : i32 = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_94ab6d();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl
new file mode 100644
index 0000000..9750726
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+
+// fn quadSwapY(e: vec<2, u32>) -> vec<2, u32>
+fn quadSwapY_a27e1c() -> vec2<u32>{
+  var arg_0 = vec2<u32>(1u);
+  var res: vec2<u32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..45ef0d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapY_a27e1c() {
+  uint2 arg_0 = (1u).xx;
+  uint2 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..75fce9e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint2 quadSwapY_a27e1c() {
+  uint2 arg_0 = (1u).xx;
+  uint2 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store2(0u, asuint(quadSwapY_a27e1c()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.glsl
new file mode 100644
index 0000000..683bc24
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.msl
new file mode 100644
index 0000000..28b56a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.spvasm
new file mode 100644
index 0000000..9507b29
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_a27e1c "quadSwapY_a27e1c"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%tint_symbol_1 = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v2uint %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_a27e1c = OpFunction %v2uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2uint Function
+        %res = OpVariable %_ptr_Function_v2uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2uint %uint_3 %13 %uint_1
+               OpStore %res %14
+         %17 = OpLoad %v2uint %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v2uint %quadSwapY_a27e1c
+         %23 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v2uint %quadSwapY_a27e1c
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.wgsl
new file mode 100644
index 0000000..b18bd8f
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a27e1c.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+fn quadSwapY_a27e1c() -> vec2<u32> {
+  var arg_0 = vec2<u32>(1u);
+  var res : vec2<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a27e1c();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl
new file mode 100644
index 0000000..ba23957
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl
@@ -0,0 +1,63 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// flags: --hlsl_shader_model 62
+
+
+enable subgroups;
+enable subgroups_f16;
+
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+
+// fn quadSwapY(e: vec<2, f16>) -> vec<2, f16>
+fn quadSwapY_a50fcb() -> vec2<f16>{
+  var arg_0 = vec2<f16>(1.h);
+  var res: vec2<f16> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..385fa88
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapY_a50fcb() {
+  vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
+  vector<float16_t, 2> res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d53079a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+vector<float16_t, 2> quadSwapY_a50fcb() {
+  vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
+  vector<float16_t, 2> res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store<vector<float16_t, 2> >(0u, quadSwapY_a50fcb());
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.glsl
new file mode 100644
index 0000000..71aaf5c
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.glsl
@@ -0,0 +1,56 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.msl
new file mode 100644
index 0000000..671deca
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.msl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.spvasm
new file mode 100644
index 0000000..3806e56
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_a50fcb "quadSwapY_a50fcb"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+%tint_symbol_1 = OpTypeStruct %v2half
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %11 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_a50fcb = OpFunction %v2half None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v2half Function
+        %res = OpVariable %_ptr_Function_v2half Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v2half %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v2half %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v2half %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v2half %quadSwapY_a50fcb
+         %25 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v2half %quadSwapY_a50fcb
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2half %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.wgsl
new file mode 100644
index 0000000..ee6138e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/a50fcb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable subgroups;
+enable subgroups_f16;
+enable f16;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec2<f16>;
+
+fn quadSwapY_a50fcb() -> vec2<f16> {
+  var arg_0 = vec2<f16>(1.0h);
+  var res : vec2<f16> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_a50fcb();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl
new file mode 100644
index 0000000..8b66532
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+
+// fn quadSwapY(e: vec<4, f32>) -> vec<4, f32>
+fn quadSwapY_b9d9e7() -> vec4<f32>{
+  var arg_0 = vec4<f32>(1.f);
+  var res: vec4<f32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f23f032
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapY_b9d9e7() {
+  float4 arg_0 = (1.0f).xxxx;
+  float4 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..29d17ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float4 quadSwapY_b9d9e7() {
+  float4 arg_0 = (1.0f).xxxx;
+  float4 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_b9d9e7()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.glsl
new file mode 100644
index 0000000..d10dccb
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.msl
new file mode 100644
index 0000000..e11967e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..3aa02a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_b9d9e7 "quadSwapY_b9d9e7"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%tint_symbol_1 = OpTypeStruct %v4float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_b9d9e7 = OpFunction %v4float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4float Function
+        %res = OpVariable %_ptr_Function_v4float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4float %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v4float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %quadSwapY_b9d9e7
+         %25 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %quadSwapY_b9d9e7
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..0462c49
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/b9d9e7.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+fn quadSwapY_b9d9e7() -> vec4<f32> {
+  var arg_0 = vec4<f32>(1.0f);
+  var res : vec4<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_b9d9e7();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl
new file mode 100644
index 0000000..4d0808e
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+
+// fn quadSwapY(e: vec<4, u32>) -> vec<4, u32>
+fn quadSwapY_bb697b() -> vec4<u32>{
+  var arg_0 = vec4<u32>(1u);
+  var res: vec4<u32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2dd1c0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapY_bb697b() {
+  uint4 arg_0 = (1u).xxxx;
+  uint4 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cf92fa0
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+uint4 quadSwapY_bb697b() {
+  uint4 arg_0 = (1u).xxxx;
+  uint4 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store4(0u, asuint(quadSwapY_bb697b()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.glsl
new file mode 100644
index 0000000..3105ff2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.msl
new file mode 100644
index 0000000..3602fc9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.spvasm
new file mode 100644
index 0000000..b2f75c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.spvasm
@@ -0,0 +1,62 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_bb697b "quadSwapY_bb697b"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+       %uint = OpTypeInt 32 0
+     %v4uint = OpTypeVector %uint 4
+%tint_symbol_1 = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %uint_1 = OpConstant %uint 1
+         %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
+     %uint_3 = OpConstant %uint 3
+       %void = OpTypeVoid
+         %20 = OpTypeFunction %void
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_bb697b = OpFunction %v4uint None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v4uint Function
+        %res = OpVariable %_ptr_Function_v4uint Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v4uint %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v4uint %uint_3 %13 %uint_1
+               OpStore %res %14
+         %17 = OpLoad %v4uint %res
+               OpReturnValue %17
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %20
+         %21 = OpLabel
+         %22 = OpFunctionCall %v4uint %quadSwapY_bb697b
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %23 %22
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %20
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4uint %quadSwapY_bb697b
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
+               OpStore %29 %28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.wgsl
new file mode 100644
index 0000000..7c67e55
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/bb697b.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+fn quadSwapY_bb697b() -> vec4<u32> {
+  var arg_0 = vec4<u32>(1u);
+  var res : vec4<u32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_bb697b();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl
new file mode 100644
index 0000000..22961d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+
+// fn quadSwapY(e: vec<3, i32>) -> vec<3, i32>
+fn quadSwapY_be4e72() -> vec3<i32>{
+  var arg_0 = vec3<i32>(1i);
+  var res: vec3<i32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b3d3003
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapY_be4e72() {
+  int3 arg_0 = (1).xxx;
+  int3 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..383caa9
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+int3 quadSwapY_be4e72() {
+  int3 arg_0 = (1).xxx;
+  int3 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_be4e72()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.glsl
new file mode 100644
index 0000000..374b0a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.msl
new file mode 100644
index 0000000..8ecd5e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.spvasm
new file mode 100644
index 0000000..dd65d19
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_be4e72 "quadSwapY_be4e72"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%tint_symbol_1 = OpTypeStruct %v3int
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3int
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+      %int_1 = OpConstant %int 1
+         %11 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_be4e72 = OpFunction %v3int None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3int Function
+        %res = OpVariable %_ptr_Function_v3int Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3int %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3int %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v3int %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3int %quadSwapY_be4e72
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v3int %quadSwapY_be4e72
+         %31 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.wgsl
new file mode 100644
index 0000000..673b7a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/be4e72.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<i32>;
+
+fn quadSwapY_be4e72() -> vec3<i32> {
+  var arg_0 = vec3<i32>(1i);
+  var res : vec3<i32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_be4e72();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl
new file mode 100644
index 0000000..f17b450
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl
@@ -0,0 +1,59 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by 'tools/src/cmd/gen' using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// To regenerate run: './tools/run gen'
+//
+//                       Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+// [hlsl-dxc] flags: --hlsl_shader_model 60
+
+
+enable subgroups;
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+
+// fn quadSwapY(e: vec<3, f32>) -> vec<3, f32>
+fn quadSwapY_d1ab4d() -> vec3<f32>{
+  var arg_0 = vec3<f32>(1.f);
+  var res: vec3<f32> = quadSwapY(arg_0);
+  return res;
+}
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2e7d4bd3
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapY_d1ab4d() {
+  float3 arg_0 = (1.0f).xxx;
+  float3 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..466d5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,20 @@
+SKIP: Wave ops not supported before SM 6.0
+
+RWByteAddressBuffer prevent_dce : register(u0);
+
+float3 quadSwapY_d1ab4d() {
+  float3 arg_0 = (1.0f).xxx;
+  float3 res = QuadReadAcrossY(arg_0);
+  return res;
+}
+
+void fragment_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  prevent_dce.Store3(0u, asuint(quadSwapY_d1ab4d()));
+  return;
+}
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.glsl b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.glsl
new file mode 100644
index 0000000..6eb06bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+Failed to generate: <dawn>/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
+enable subgroups;
+       ^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.ir.msl
new file mode 100644
index 0000000..24f2d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.ir.msl
@@ -0,0 +1,9 @@
+SKIP: FAILED
+
+<dawn>/src/tint/lang/msl/writer/printer/printer.cc:1054 internal compiler error: TINT_UNREACHABLE unhandled: quadSwapY
+********************************************************************
+*  The tint shader compiler has encountered an unexpected error.   *
+*                                                                  *
+*  Please help us fix this issue by submitting a bug report at     *
+*  crbug.com/tint with the source program that triggered the bug.  *
+********************************************************************
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.msl b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.msl
new file mode 100644
index 0000000..1d82fef
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.msl
@@ -0,0 +1,24 @@
+SKIP: FAILED
+
+
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+Failed to generate: error: Unknown import method: quadSwapY
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.spvasm
new file mode 100644
index 0000000..d544f3a
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.spvasm
@@ -0,0 +1,64 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability GroupNonUniformQuad
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpMemberName %tint_symbol_1 0 "tint_symbol"
+               OpName %tint_symbol_1 "tint_symbol_1"
+               OpName %quadSwapY_d1ab4d "quadSwapY_d1ab4d"
+               OpName %arg_0 "arg_0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpMemberDecorate %tint_symbol_1 0 Offset 0
+               OpDecorate %tint_symbol_1 Block
+               OpDecorate %1 DescriptorSet 0
+               OpDecorate %1 Binding 0
+      %float = OpTypeFloat 32
+    %v3float = OpTypeVector %float 3
+%tint_symbol_1 = OpTypeStruct %v3float
+%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
+          %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
+          %7 = OpTypeFunction %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+    %float_1 = OpConstant %float 1
+         %11 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+     %uint_1 = OpConstant %uint 1
+       %void = OpTypeVoid
+         %22 = OpTypeFunction %void
+%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
+     %uint_0 = OpConstant %uint 0
+%quadSwapY_d1ab4d = OpFunction %v3float None %7
+          %8 = OpLabel
+      %arg_0 = OpVariable %_ptr_Function_v3float Function
+        %res = OpVariable %_ptr_Function_v3float Function
+               OpStore %arg_0 %11
+         %13 = OpLoad %v3float %arg_0
+         %14 = OpGroupNonUniformQuadSwap %v3float %uint_3 %13 %uint_1
+               OpStore %res %14
+         %19 = OpLoad %v3float %res
+               OpReturnValue %19
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %22
+         %23 = OpLabel
+         %24 = OpFunctionCall %v3float %quadSwapY_d1ab4d
+         %25 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %25 %24
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %22
+         %29 = OpLabel
+         %30 = OpFunctionCall %v3float %quadSwapY_d1ab4d
+         %31 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0
+               OpStore %31 %30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.wgsl
new file mode 100644
index 0000000..b098359
--- /dev/null
+++ b/test/tint/builtins/gen/var/quadSwapY/d1ab4d.wgsl.expected.wgsl
@@ -0,0 +1,19 @@
+enable subgroups;
+
+@group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<f32>;
+
+fn quadSwapY_d1ab4d() -> vec3<f32> {
+  var arg_0 = vec3<f32>(1.0f);
+  var res : vec3<f32> = quadSwapY(arg_0);
+  return res;
+}
+
+@fragment
+fn fragment_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  prevent_dce = quadSwapY_d1ab4d();
+}