[clang] e9ff4e4 - [Clang][RISCV] Add vundefine intrinsics for tuple types (#70354)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 06:59:07 PDT 2023


Author: Yueh-Ting (eop) Chen
Date: 2023-10-30T21:59:02+08:00
New Revision: e9ff4e4291a2748a87ab53c4e623fdc3a21960c0

URL: https://github.com/llvm/llvm-project/commit/e9ff4e4291a2748a87ab53c4e623fdc3a21960c0
DIFF: https://github.com/llvm/llvm-project/commit/e9ff4e4291a2748a87ab53c4e623fdc3a21960c0.diff

LOG: [Clang][RISCV] Add vundefine intrinsics for tuple types (#70354)

riscv-non-isa/rvv-intrinsic-doc#288

Added: 
    

Modified: 
    clang/include/clang/Basic/riscv_vector.td
    clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vundefined.c

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/riscv_vector.td b/clang/include/clang/Basic/riscv_vector.td
index c685f3ef6087d81..63316da940594b1 100644
--- a/clang/include/clang/Basic/riscv_vector.td
+++ b/clang/include/clang/Basic/riscv_vector.td
@@ -2320,6 +2320,15 @@ let HasMasked = false, HasVL = false, IRName = "" in {
       }] in {
     def vundefined : RVVBuiltin<"v", "v", "csilxfd">;
     def vundefined_u : RVVBuiltin<"Uv", "Uv", "csil">;
+
+    foreach nf = NFList in {
+      let NF = nf in {
+        defvar T = "(Tuple:" # nf # ")";
+        def : RVVBuiltin<T # "v", T # "v", "csilxfd">;
+        def : RVVBuiltin<T # "Uv", T # "Uv", "csil">;
+      }
+    }
+
   }
 
   // LMUL truncation

diff  --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vundefined.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vundefined.c
index 5f474f8a5f55575..721fde373ab1249 100644
--- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vundefined.c
+++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vundefined.c
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3
 // REQUIRES: riscv-registered-target
 // RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zfh \
 // RUN:   -target-feature +zvfh -disable-O0-optnone  \
@@ -7,534 +7,2189 @@
 
 #include <riscv_vector.h>
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x half> @test_vundefined_f16mf4
-// CHECK-RV64-SAME: () #[[ATTR0:[0-9]+]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x half> @test_vundefined_f16mf4(
+// CHECK-RV64-SAME: ) #[[ATTR0:[0-9]+]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x half> poison
 //
-vfloat16mf4_t test_vundefined_f16mf4() {
-  return __riscv_vundefined_f16mf4();
-}
+vfloat16mf4_t test_vundefined_f16mf4() { return __riscv_vundefined_f16mf4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x half> @test_vundefined_f16mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x half> @test_vundefined_f16mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x half> poison
 //
-vfloat16mf2_t test_vundefined_f16mf2() {
-  return __riscv_vundefined_f16mf2();
-}
+vfloat16mf2_t test_vundefined_f16mf2() { return __riscv_vundefined_f16mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x half> @test_vundefined_f16m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x half> @test_vundefined_f16m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x half> poison
 //
-vfloat16m1_t test_vundefined_f16m1() {
-  return __riscv_vundefined_f16m1();
-}
+vfloat16m1_t test_vundefined_f16m1() { return __riscv_vundefined_f16m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x half> @test_vundefined_f16m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x half> @test_vundefined_f16m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x half> poison
 //
-vfloat16m2_t test_vundefined_f16m2() {
-  return __riscv_vundefined_f16m2();
-}
+vfloat16m2_t test_vundefined_f16m2() { return __riscv_vundefined_f16m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x half> @test_vundefined_f16m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x half> @test_vundefined_f16m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x half> poison
 //
-vfloat16m4_t test_vundefined_f16m4() {
-  return __riscv_vundefined_f16m4();
-}
+vfloat16m4_t test_vundefined_f16m4() { return __riscv_vundefined_f16m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 32 x half> @test_vundefined_f16m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 32 x half> @test_vundefined_f16m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 32 x half> poison
 //
-vfloat16m8_t test_vundefined_f16m8() {
-  return __riscv_vundefined_f16m8();
-}
+vfloat16m8_t test_vundefined_f16m8() { return __riscv_vundefined_f16m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x float> @test_vundefined_f32mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x float> @test_vundefined_f32mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x float> poison
 //
-vfloat32mf2_t test_vundefined_f32mf2() {
-  return __riscv_vundefined_f32mf2();
-}
+vfloat32mf2_t test_vundefined_f32mf2() { return __riscv_vundefined_f32mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x float> @test_vundefined_f32m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x float> @test_vundefined_f32m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x float> poison
 //
-vfloat32m1_t test_vundefined_f32m1() {
-  return __riscv_vundefined_f32m1();
-}
+vfloat32m1_t test_vundefined_f32m1() { return __riscv_vundefined_f32m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x float> @test_vundefined_f32m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x float> @test_vundefined_f32m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x float> poison
 //
-vfloat32m2_t test_vundefined_f32m2() {
-  return __riscv_vundefined_f32m2();
-}
+vfloat32m2_t test_vundefined_f32m2() { return __riscv_vundefined_f32m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x float> @test_vundefined_f32m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x float> @test_vundefined_f32m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x float> poison
 //
-vfloat32m4_t test_vundefined_f32m4() {
-  return __riscv_vundefined_f32m4();
-}
+vfloat32m4_t test_vundefined_f32m4() { return __riscv_vundefined_f32m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x float> @test_vundefined_f32m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x float> @test_vundefined_f32m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x float> poison
 //
-vfloat32m8_t test_vundefined_f32m8() {
-  return __riscv_vundefined_f32m8();
-}
+vfloat32m8_t test_vundefined_f32m8() { return __riscv_vundefined_f32m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x double> @test_vundefined_f64m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x double> @test_vundefined_f64m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x double> poison
 //
-vfloat64m1_t test_vundefined_f64m1() {
-  return __riscv_vundefined_f64m1();
-}
+vfloat64m1_t test_vundefined_f64m1() { return __riscv_vundefined_f64m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x double> @test_vundefined_f64m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x double> @test_vundefined_f64m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x double> poison
 //
-vfloat64m2_t test_vundefined_f64m2() {
-  return __riscv_vundefined_f64m2();
-}
+vfloat64m2_t test_vundefined_f64m2() { return __riscv_vundefined_f64m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x double> @test_vundefined_f64m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x double> @test_vundefined_f64m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x double> poison
 //
-vfloat64m4_t test_vundefined_f64m4() {
-  return __riscv_vundefined_f64m4();
-}
+vfloat64m4_t test_vundefined_f64m4() { return __riscv_vundefined_f64m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x double> @test_vundefined_f64m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x double> @test_vundefined_f64m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x double> poison
 //
-vfloat64m8_t test_vundefined_f64m8() {
-  return __riscv_vundefined_f64m8();
-}
+vfloat64m8_t test_vundefined_f64m8() { return __riscv_vundefined_f64m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i8> @test_vundefined_i8mf8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i8> @test_vundefined_i8mf8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i8> poison
 //
-vint8mf8_t test_vundefined_i8mf8() {
-  return __riscv_vundefined_i8mf8();
-}
+vint8mf8_t test_vundefined_i8mf8() { return __riscv_vundefined_i8mf8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i8> @test_vundefined_i8mf4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i8> @test_vundefined_i8mf4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i8> poison
 //
-vint8mf4_t test_vundefined_i8mf4() {
-  return __riscv_vundefined_i8mf4();
-}
+vint8mf4_t test_vundefined_i8mf4() { return __riscv_vundefined_i8mf4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i8> @test_vundefined_i8mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i8> @test_vundefined_i8mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i8> poison
 //
-vint8mf2_t test_vundefined_i8mf2() {
-  return __riscv_vundefined_i8mf2();
-}
+vint8mf2_t test_vundefined_i8mf2() { return __riscv_vundefined_i8mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i8> @test_vundefined_i8m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i8> @test_vundefined_i8m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> poison
 //
-vint8m1_t test_vundefined_i8m1() {
-  return __riscv_vundefined_i8m1();
-}
+vint8m1_t test_vundefined_i8m1() { return __riscv_vundefined_i8m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i8> @test_vundefined_i8m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i8> @test_vundefined_i8m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x i8> poison
 //
-vint8m2_t test_vundefined_i8m2() {
-  return __riscv_vundefined_i8m2();
-}
+vint8m2_t test_vundefined_i8m2() { return __riscv_vundefined_i8m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i8> @test_vundefined_i8m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i8> @test_vundefined_i8m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 32 x i8> poison
 //
-vint8m4_t test_vundefined_i8m4() {
-  return __riscv_vundefined_i8m4();
-}
+vint8m4_t test_vundefined_i8m4() { return __riscv_vundefined_i8m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 64 x i8> @test_vundefined_i8m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 64 x i8> @test_vundefined_i8m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 64 x i8> poison
 //
-vint8m8_t test_vundefined_i8m8() {
-  return __riscv_vundefined_i8m8();
-}
+vint8m8_t test_vundefined_i8m8() { return __riscv_vundefined_i8m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i16> @test_vundefined_i16mf4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i16> @test_vundefined_i16mf4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i16> poison
 //
-vint16mf4_t test_vundefined_i16mf4() {
-  return __riscv_vundefined_i16mf4();
-}
+vint16mf4_t test_vundefined_i16mf4() { return __riscv_vundefined_i16mf4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i16> @test_vundefined_i16mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i16> @test_vundefined_i16mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i16> poison
 //
-vint16mf2_t test_vundefined_i16mf2() {
-  return __riscv_vundefined_i16mf2();
-}
+vint16mf2_t test_vundefined_i16mf2() { return __riscv_vundefined_i16mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i16> @test_vundefined_i16m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i16> @test_vundefined_i16m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> poison
 //
-vint16m1_t test_vundefined_i16m1() {
-  return __riscv_vundefined_i16m1();
-}
+vint16m1_t test_vundefined_i16m1() { return __riscv_vundefined_i16m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i16> @test_vundefined_i16m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i16> @test_vundefined_i16m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i16> poison
 //
-vint16m2_t test_vundefined_i16m2() {
-  return __riscv_vundefined_i16m2();
-}
+vint16m2_t test_vundefined_i16m2() { return __riscv_vundefined_i16m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i16> @test_vundefined_i16m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i16> @test_vundefined_i16m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x i16> poison
 //
-vint16m4_t test_vundefined_i16m4() {
-  return __riscv_vundefined_i16m4();
-}
+vint16m4_t test_vundefined_i16m4() { return __riscv_vundefined_i16m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i16> @test_vundefined_i16m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i16> @test_vundefined_i16m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 32 x i16> poison
 //
-vint16m8_t test_vundefined_i16m8() {
-  return __riscv_vundefined_i16m8();
-}
+vint16m8_t test_vundefined_i16m8() { return __riscv_vundefined_i16m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i32> @test_vundefined_i32mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i32> @test_vundefined_i32mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i32> poison
 //
-vint32mf2_t test_vundefined_i32mf2() {
-  return __riscv_vundefined_i32mf2();
-}
+vint32mf2_t test_vundefined_i32mf2() { return __riscv_vundefined_i32mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vundefined_i32m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vundefined_i32m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> poison
 //
-vint32m1_t test_vundefined_i32m1() {
-  return __riscv_vundefined_i32m1();
-}
+vint32m1_t test_vundefined_i32m1() { return __riscv_vundefined_i32m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vundefined_i32m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vundefined_i32m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i32> poison
 //
-vint32m2_t test_vundefined_i32m2() {
-  return __riscv_vundefined_i32m2();
-}
+vint32m2_t test_vundefined_i32m2() { return __riscv_vundefined_i32m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vundefined_i32m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vundefined_i32m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i32> poison
 //
-vint32m4_t test_vundefined_i32m4() {
-  return __riscv_vundefined_i32m4();
-}
+vint32m4_t test_vundefined_i32m4() { return __riscv_vundefined_i32m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vundefined_i32m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vundefined_i32m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x i32> poison
 //
-vint32m8_t test_vundefined_i32m8() {
-  return __riscv_vundefined_i32m8();
-}
+vint32m8_t test_vundefined_i32m8() { return __riscv_vundefined_i32m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i64> @test_vundefined_i64m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i64> @test_vundefined_i64m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> poison
 //
-vint64m1_t test_vundefined_i64m1() {
-  return __riscv_vundefined_i64m1();
-}
+vint64m1_t test_vundefined_i64m1() { return __riscv_vundefined_i64m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i64> @test_vundefined_i64m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i64> @test_vundefined_i64m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i64> poison
 //
-vint64m2_t test_vundefined_i64m2() {
-  return __riscv_vundefined_i64m2();
-}
+vint64m2_t test_vundefined_i64m2() { return __riscv_vundefined_i64m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i64> @test_vundefined_i64m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i64> @test_vundefined_i64m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i64> poison
 //
-vint64m4_t test_vundefined_i64m4() {
-  return __riscv_vundefined_i64m4();
-}
+vint64m4_t test_vundefined_i64m4() { return __riscv_vundefined_i64m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i64> @test_vundefined_i64m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i64> @test_vundefined_i64m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i64> poison
 //
-vint64m8_t test_vundefined_i64m8() {
-  return __riscv_vundefined_i64m8();
-}
+vint64m8_t test_vundefined_i64m8() { return __riscv_vundefined_i64m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i8> @test_vundefined_u8mf8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i8> @test_vundefined_u8mf8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i8> poison
 //
-vuint8mf8_t test_vundefined_u8mf8() {
-  return __riscv_vundefined_u8mf8();
-}
+vuint8mf8_t test_vundefined_u8mf8() { return __riscv_vundefined_u8mf8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i8> @test_vundefined_u8mf4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i8> @test_vundefined_u8mf4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i8> poison
 //
-vuint8mf4_t test_vundefined_u8mf4() {
-  return __riscv_vundefined_u8mf4();
-}
+vuint8mf4_t test_vundefined_u8mf4() { return __riscv_vundefined_u8mf4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i8> @test_vundefined_u8mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i8> @test_vundefined_u8mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i8> poison
 //
-vuint8mf2_t test_vundefined_u8mf2() {
-  return __riscv_vundefined_u8mf2();
-}
+vuint8mf2_t test_vundefined_u8mf2() { return __riscv_vundefined_u8mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i8> @test_vundefined_u8m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i8> @test_vundefined_u8m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i8> poison
 //
-vuint8m1_t test_vundefined_u8m1() {
-  return __riscv_vundefined_u8m1();
-}
+vuint8m1_t test_vundefined_u8m1() { return __riscv_vundefined_u8m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i8> @test_vundefined_u8m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i8> @test_vundefined_u8m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x i8> poison
 //
-vuint8m2_t test_vundefined_u8m2() {
-  return __riscv_vundefined_u8m2();
-}
+vuint8m2_t test_vundefined_u8m2() { return __riscv_vundefined_u8m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i8> @test_vundefined_u8m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i8> @test_vundefined_u8m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 32 x i8> poison
 //
-vuint8m4_t test_vundefined_u8m4() {
-  return __riscv_vundefined_u8m4();
-}
+vuint8m4_t test_vundefined_u8m4() { return __riscv_vundefined_u8m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 64 x i8> @test_vundefined_u8m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 64 x i8> @test_vundefined_u8m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 64 x i8> poison
 //
-vuint8m8_t test_vundefined_u8m8() {
-  return __riscv_vundefined_u8m8();
-}
+vuint8m8_t test_vundefined_u8m8() { return __riscv_vundefined_u8m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i16> @test_vundefined_u16mf4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i16> @test_vundefined_u16mf4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i16> poison
 //
-vuint16mf4_t test_vundefined_u16mf4() {
-  return __riscv_vundefined_u16mf4();
-}
+vuint16mf4_t test_vundefined_u16mf4() { return __riscv_vundefined_u16mf4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i16> @test_vundefined_u16mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i16> @test_vundefined_u16mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i16> poison
 //
-vuint16mf2_t test_vundefined_u16mf2() {
-  return __riscv_vundefined_u16mf2();
-}
+vuint16mf2_t test_vundefined_u16mf2() { return __riscv_vundefined_u16mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i16> @test_vundefined_u16m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i16> @test_vundefined_u16m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i16> poison
 //
-vuint16m1_t test_vundefined_u16m1() {
-  return __riscv_vundefined_u16m1();
-}
+vuint16m1_t test_vundefined_u16m1() { return __riscv_vundefined_u16m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i16> @test_vundefined_u16m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i16> @test_vundefined_u16m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i16> poison
 //
-vuint16m2_t test_vundefined_u16m2() {
-  return __riscv_vundefined_u16m2();
-}
+vuint16m2_t test_vundefined_u16m2() { return __riscv_vundefined_u16m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i16> @test_vundefined_u16m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i16> @test_vundefined_u16m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x i16> poison
 //
-vuint16m4_t test_vundefined_u16m4() {
-  return __riscv_vundefined_u16m4();
-}
+vuint16m4_t test_vundefined_u16m4() { return __riscv_vundefined_u16m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i16> @test_vundefined_u16m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 32 x i16> @test_vundefined_u16m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 32 x i16> poison
 //
-vuint16m8_t test_vundefined_u16m8() {
-  return __riscv_vundefined_u16m8();
-}
+vuint16m8_t test_vundefined_u16m8() { return __riscv_vundefined_u16m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i32> @test_vundefined_u32mf2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i32> @test_vundefined_u32mf2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i32> poison
 //
-vuint32mf2_t test_vundefined_u32mf2() {
-  return __riscv_vundefined_u32mf2();
-}
+vuint32mf2_t test_vundefined_u32mf2() { return __riscv_vundefined_u32mf2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vundefined_u32m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i32> @test_vundefined_u32m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i32> poison
 //
-vuint32m1_t test_vundefined_u32m1() {
-  return __riscv_vundefined_u32m1();
-}
+vuint32m1_t test_vundefined_u32m1() { return __riscv_vundefined_u32m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vundefined_u32m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i32> @test_vundefined_u32m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i32> poison
 //
-vuint32m2_t test_vundefined_u32m2() {
-  return __riscv_vundefined_u32m2();
-}
+vuint32m2_t test_vundefined_u32m2() { return __riscv_vundefined_u32m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vundefined_u32m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i32> @test_vundefined_u32m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i32> poison
 //
-vuint32m4_t test_vundefined_u32m4() {
-  return __riscv_vundefined_u32m4();
-}
+vuint32m4_t test_vundefined_u32m4() { return __riscv_vundefined_u32m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vundefined_u32m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 16 x i32> @test_vundefined_u32m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 16 x i32> poison
 //
-vuint32m8_t test_vundefined_u32m8() {
-  return __riscv_vundefined_u32m8();
-}
+vuint32m8_t test_vundefined_u32m8() { return __riscv_vundefined_u32m8(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i64> @test_vundefined_u64m1
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 1 x i64> @test_vundefined_u64m1(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 1 x i64> poison
 //
-vuint64m1_t test_vundefined_u64m1() {
-  return __riscv_vundefined_u64m1();
-}
+vuint64m1_t test_vundefined_u64m1() { return __riscv_vundefined_u64m1(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i64> @test_vundefined_u64m2
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 2 x i64> @test_vundefined_u64m2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 2 x i64> poison
 //
-vuint64m2_t test_vundefined_u64m2() {
-  return __riscv_vundefined_u64m2();
-}
+vuint64m2_t test_vundefined_u64m2() { return __riscv_vundefined_u64m2(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i64> @test_vundefined_u64m4
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 4 x i64> @test_vundefined_u64m4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 4 x i64> poison
 //
-vuint64m4_t test_vundefined_u64m4() {
-  return __riscv_vundefined_u64m4();
-}
+vuint64m4_t test_vundefined_u64m4() { return __riscv_vundefined_u64m4(); }
 
-// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i64> @test_vundefined_u64m8
-// CHECK-RV64-SAME: () #[[ATTR0]] {
+// CHECK-RV64-LABEL: define dso_local <vscale x 8 x i64> @test_vundefined_u64m8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
 // CHECK-RV64-NEXT:  entry:
 // CHECK-RV64-NEXT:    ret <vscale x 8 x i64> poison
 //
-vuint64m8_t test_vundefined_u64m8() {
-  return __riscv_vundefined_u64m8();
+vuint64m8_t test_vundefined_u64m8() { return __riscv_vundefined_u64m8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x half>, <vscale x 1 x half> } @test_vundefined_f16mf4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x half>, <vscale x 1 x half> } poison
+//
+vfloat16mf4x2_t test_vundefined_f16mf4x2() {
+  return __riscv_vundefined_f16mf4x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } @test_vundefined_f16mf4x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } poison
+//
+vfloat16mf4x3_t test_vundefined_f16mf4x3() {
+  return __riscv_vundefined_f16mf4x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } @test_vundefined_f16mf4x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } poison
+//
+vfloat16mf4x4_t test_vundefined_f16mf4x4() {
+  return __riscv_vundefined_f16mf4x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } @test_vundefined_f16mf4x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } poison
+//
+vfloat16mf4x5_t test_vundefined_f16mf4x5() {
+  return __riscv_vundefined_f16mf4x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } @test_vundefined_f16mf4x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } poison
+//
+vfloat16mf4x6_t test_vundefined_f16mf4x6() {
+  return __riscv_vundefined_f16mf4x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } @test_vundefined_f16mf4x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } poison
+//
+vfloat16mf4x7_t test_vundefined_f16mf4x7() {
+  return __riscv_vundefined_f16mf4x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } @test_vundefined_f16mf4x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half> } poison
+//
+vfloat16mf4x8_t test_vundefined_f16mf4x8() {
+  return __riscv_vundefined_f16mf4x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x half>, <vscale x 2 x half> } @test_vundefined_f16mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x half>, <vscale x 2 x half> } poison
+//
+vfloat16mf2x2_t test_vundefined_f16mf2x2() {
+  return __riscv_vundefined_f16mf2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } @test_vundefined_f16mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } poison
+//
+vfloat16mf2x3_t test_vundefined_f16mf2x3() {
+  return __riscv_vundefined_f16mf2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } @test_vundefined_f16mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } poison
+//
+vfloat16mf2x4_t test_vundefined_f16mf2x4() {
+  return __riscv_vundefined_f16mf2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } @test_vundefined_f16mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } poison
+//
+vfloat16mf2x5_t test_vundefined_f16mf2x5() {
+  return __riscv_vundefined_f16mf2x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } @test_vundefined_f16mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } poison
+//
+vfloat16mf2x6_t test_vundefined_f16mf2x6() {
+  return __riscv_vundefined_f16mf2x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } @test_vundefined_f16mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } poison
+//
+vfloat16mf2x7_t test_vundefined_f16mf2x7() {
+  return __riscv_vundefined_f16mf2x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } @test_vundefined_f16mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half> } poison
+//
+vfloat16mf2x8_t test_vundefined_f16mf2x8() {
+  return __riscv_vundefined_f16mf2x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x half>, <vscale x 4 x half> } @test_vundefined_f16m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x half>, <vscale x 4 x half> } poison
+//
+vfloat16m1x2_t test_vundefined_f16m1x2() {
+  return __riscv_vundefined_f16m1x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } @test_vundefined_f16m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } poison
+//
+vfloat16m1x3_t test_vundefined_f16m1x3() {
+  return __riscv_vundefined_f16m1x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } @test_vundefined_f16m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } poison
+//
+vfloat16m1x4_t test_vundefined_f16m1x4() {
+  return __riscv_vundefined_f16m1x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } @test_vundefined_f16m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } poison
+//
+vfloat16m1x5_t test_vundefined_f16m1x5() {
+  return __riscv_vundefined_f16m1x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } @test_vundefined_f16m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } poison
+//
+vfloat16m1x6_t test_vundefined_f16m1x6() {
+  return __riscv_vundefined_f16m1x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } @test_vundefined_f16m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } poison
+//
+vfloat16m1x7_t test_vundefined_f16m1x7() {
+  return __riscv_vundefined_f16m1x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } @test_vundefined_f16m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half> } poison
+//
+vfloat16m1x8_t test_vundefined_f16m1x8() {
+  return __riscv_vundefined_f16m1x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x half>, <vscale x 8 x half> } @test_vundefined_f16m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x half>, <vscale x 8 x half> } poison
+//
+vfloat16m2x2_t test_vundefined_f16m2x2() {
+  return __riscv_vundefined_f16m2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } @test_vundefined_f16m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } poison
+//
+vfloat16m2x3_t test_vundefined_f16m2x3() {
+  return __riscv_vundefined_f16m2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } @test_vundefined_f16m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } poison
+//
+vfloat16m2x4_t test_vundefined_f16m2x4() {
+  return __riscv_vundefined_f16m2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x half>, <vscale x 16 x half> } @test_vundefined_f16m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x half>, <vscale x 16 x half> } poison
+//
+vfloat16m4x2_t test_vundefined_f16m4x2() {
+  return __riscv_vundefined_f16m4x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x float>, <vscale x 1 x float> } @test_vundefined_f32mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x float>, <vscale x 1 x float> } poison
+//
+vfloat32mf2x2_t test_vundefined_f32mf2x2() {
+  return __riscv_vundefined_f32mf2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } @test_vundefined_f32mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } poison
+//
+vfloat32mf2x3_t test_vundefined_f32mf2x3() {
+  return __riscv_vundefined_f32mf2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } @test_vundefined_f32mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } poison
+//
+vfloat32mf2x4_t test_vundefined_f32mf2x4() {
+  return __riscv_vundefined_f32mf2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } @test_vundefined_f32mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } poison
+//
+vfloat32mf2x5_t test_vundefined_f32mf2x5() {
+  return __riscv_vundefined_f32mf2x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } @test_vundefined_f32mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } poison
+//
+vfloat32mf2x6_t test_vundefined_f32mf2x6() {
+  return __riscv_vundefined_f32mf2x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } @test_vundefined_f32mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } poison
+//
+vfloat32mf2x7_t test_vundefined_f32mf2x7() {
+  return __riscv_vundefined_f32mf2x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } @test_vundefined_f32mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float> } poison
+//
+vfloat32mf2x8_t test_vundefined_f32mf2x8() {
+  return __riscv_vundefined_f32mf2x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x float>, <vscale x 2 x float> } @test_vundefined_f32m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x float>, <vscale x 2 x float> } poison
+//
+vfloat32m1x2_t test_vundefined_f32m1x2() {
+  return __riscv_vundefined_f32m1x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } @test_vundefined_f32m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } poison
+//
+vfloat32m1x3_t test_vundefined_f32m1x3() {
+  return __riscv_vundefined_f32m1x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } @test_vundefined_f32m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } poison
+//
+vfloat32m1x4_t test_vundefined_f32m1x4() {
+  return __riscv_vundefined_f32m1x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } @test_vundefined_f32m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } poison
+//
+vfloat32m1x5_t test_vundefined_f32m1x5() {
+  return __riscv_vundefined_f32m1x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } @test_vundefined_f32m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } poison
+//
+vfloat32m1x6_t test_vundefined_f32m1x6() {
+  return __riscv_vundefined_f32m1x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } @test_vundefined_f32m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } poison
+//
+vfloat32m1x7_t test_vundefined_f32m1x7() {
+  return __riscv_vundefined_f32m1x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } @test_vundefined_f32m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float> } poison
+//
+vfloat32m1x8_t test_vundefined_f32m1x8() {
+  return __riscv_vundefined_f32m1x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x float>, <vscale x 4 x float> } @test_vundefined_f32m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x float>, <vscale x 4 x float> } poison
+//
+vfloat32m2x2_t test_vundefined_f32m2x2() {
+  return __riscv_vundefined_f32m2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @test_vundefined_f32m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } poison
+//
+vfloat32m2x3_t test_vundefined_f32m2x3() {
+  return __riscv_vundefined_f32m2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @test_vundefined_f32m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } poison
+//
+vfloat32m2x4_t test_vundefined_f32m2x4() {
+  return __riscv_vundefined_f32m2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x float>, <vscale x 8 x float> } @test_vundefined_f32m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x float>, <vscale x 8 x float> } poison
+//
+vfloat32m4x2_t test_vundefined_f32m4x2() {
+  return __riscv_vundefined_f32m4x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x double>, <vscale x 1 x double> } @test_vundefined_f64m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x double>, <vscale x 1 x double> } poison
+//
+vfloat64m1x2_t test_vundefined_f64m1x2() {
+  return __riscv_vundefined_f64m1x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } @test_vundefined_f64m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } poison
+//
+vfloat64m1x3_t test_vundefined_f64m1x3() {
+  return __riscv_vundefined_f64m1x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } @test_vundefined_f64m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } poison
+//
+vfloat64m1x4_t test_vundefined_f64m1x4() {
+  return __riscv_vundefined_f64m1x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } @test_vundefined_f64m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } poison
+//
+vfloat64m1x5_t test_vundefined_f64m1x5() {
+  return __riscv_vundefined_f64m1x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } @test_vundefined_f64m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } poison
+//
+vfloat64m1x6_t test_vundefined_f64m1x6() {
+  return __riscv_vundefined_f64m1x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } @test_vundefined_f64m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } poison
+//
+vfloat64m1x7_t test_vundefined_f64m1x7() {
+  return __riscv_vundefined_f64m1x7();
 }
 
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } @test_vundefined_f64m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double> } poison
+//
+vfloat64m1x8_t test_vundefined_f64m1x8() {
+  return __riscv_vundefined_f64m1x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x double>, <vscale x 2 x double> } @test_vundefined_f64m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x double>, <vscale x 2 x double> } poison
+//
+vfloat64m2x2_t test_vundefined_f64m2x2() {
+  return __riscv_vundefined_f64m2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } @test_vundefined_f64m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } poison
+//
+vfloat64m2x3_t test_vundefined_f64m2x3() {
+  return __riscv_vundefined_f64m2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } @test_vundefined_f64m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } poison
+//
+vfloat64m2x4_t test_vundefined_f64m2x4() {
+  return __riscv_vundefined_f64m2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x double>, <vscale x 4 x double> } @test_vundefined_f64m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x double>, <vscale x 4 x double> } poison
+//
+vfloat64m4x2_t test_vundefined_f64m4x2() {
+  return __riscv_vundefined_f64m4x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_i8mf8x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vint8mf8x2_t test_vundefined_i8mf8x2() { return __riscv_vundefined_i8mf8x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_i8mf8x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vint8mf8x3_t test_vundefined_i8mf8x3() { return __riscv_vundefined_i8mf8x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_i8mf8x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vint8mf8x4_t test_vundefined_i8mf8x4() { return __riscv_vundefined_i8mf8x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_i8mf8x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vint8mf8x5_t test_vundefined_i8mf8x5() { return __riscv_vundefined_i8mf8x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_i8mf8x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vint8mf8x6_t test_vundefined_i8mf8x6() { return __riscv_vundefined_i8mf8x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_i8mf8x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vint8mf8x7_t test_vundefined_i8mf8x7() { return __riscv_vundefined_i8mf8x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_i8mf8x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vint8mf8x8_t test_vundefined_i8mf8x8() { return __riscv_vundefined_i8mf8x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_i8mf4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vint8mf4x2_t test_vundefined_i8mf4x2() { return __riscv_vundefined_i8mf4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_i8mf4x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vint8mf4x3_t test_vundefined_i8mf4x3() { return __riscv_vundefined_i8mf4x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_i8mf4x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vint8mf4x4_t test_vundefined_i8mf4x4() { return __riscv_vundefined_i8mf4x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_i8mf4x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vint8mf4x5_t test_vundefined_i8mf4x5() { return __riscv_vundefined_i8mf4x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_i8mf4x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vint8mf4x6_t test_vundefined_i8mf4x6() { return __riscv_vundefined_i8mf4x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_i8mf4x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vint8mf4x7_t test_vundefined_i8mf4x7() { return __riscv_vundefined_i8mf4x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_i8mf4x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vint8mf4x8_t test_vundefined_i8mf4x8() { return __riscv_vundefined_i8mf4x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_i8mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vint8mf2x2_t test_vundefined_i8mf2x2() { return __riscv_vundefined_i8mf2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_i8mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vint8mf2x3_t test_vundefined_i8mf2x3() { return __riscv_vundefined_i8mf2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_i8mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vint8mf2x4_t test_vundefined_i8mf2x4() { return __riscv_vundefined_i8mf2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_i8mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vint8mf2x5_t test_vundefined_i8mf2x5() { return __riscv_vundefined_i8mf2x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_i8mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vint8mf2x6_t test_vundefined_i8mf2x6() { return __riscv_vundefined_i8mf2x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_i8mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vint8mf2x7_t test_vundefined_i8mf2x7() { return __riscv_vundefined_i8mf2x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_i8mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vint8mf2x8_t test_vundefined_i8mf2x8() { return __riscv_vundefined_i8mf2x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_i8m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vint8m1x2_t test_vundefined_i8m1x2() { return __riscv_vundefined_i8m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_i8m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vint8m1x3_t test_vundefined_i8m1x3() { return __riscv_vundefined_i8m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_i8m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vint8m1x4_t test_vundefined_i8m1x4() { return __riscv_vundefined_i8m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_i8m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vint8m1x5_t test_vundefined_i8m1x5() { return __riscv_vundefined_i8m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_i8m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vint8m1x6_t test_vundefined_i8m1x6() { return __riscv_vundefined_i8m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_i8m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vint8m1x7_t test_vundefined_i8m1x7() { return __riscv_vundefined_i8m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_i8m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vint8m1x8_t test_vundefined_i8m1x8() { return __riscv_vundefined_i8m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i8>, <vscale x 16 x i8> } @test_vundefined_i8m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8> } poison
+//
+vint8m2x2_t test_vundefined_i8m2x2() { return __riscv_vundefined_i8m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } @test_vundefined_i8m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison
+//
+vint8m2x3_t test_vundefined_i8m2x3() { return __riscv_vundefined_i8m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } @test_vundefined_i8m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison
+//
+vint8m2x4_t test_vundefined_i8m2x4() { return __riscv_vundefined_i8m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 32 x i8>, <vscale x 32 x i8> } @test_vundefined_i8m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 32 x i8>, <vscale x 32 x i8> } poison
+//
+vint8m4x2_t test_vundefined_i8m4x2() { return __riscv_vundefined_i8m4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_i16mf4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vint16mf4x2_t test_vundefined_i16mf4x2() {
+  return __riscv_vundefined_i16mf4x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_i16mf4x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vint16mf4x3_t test_vundefined_i16mf4x3() {
+  return __riscv_vundefined_i16mf4x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_i16mf4x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vint16mf4x4_t test_vundefined_i16mf4x4() {
+  return __riscv_vundefined_i16mf4x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_i16mf4x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vint16mf4x5_t test_vundefined_i16mf4x5() {
+  return __riscv_vundefined_i16mf4x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_i16mf4x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vint16mf4x6_t test_vundefined_i16mf4x6() {
+  return __riscv_vundefined_i16mf4x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_i16mf4x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vint16mf4x7_t test_vundefined_i16mf4x7() {
+  return __riscv_vundefined_i16mf4x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_i16mf4x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vint16mf4x8_t test_vundefined_i16mf4x8() {
+  return __riscv_vundefined_i16mf4x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_i16mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vint16mf2x2_t test_vundefined_i16mf2x2() {
+  return __riscv_vundefined_i16mf2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_i16mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vint16mf2x3_t test_vundefined_i16mf2x3() {
+  return __riscv_vundefined_i16mf2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_i16mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vint16mf2x4_t test_vundefined_i16mf2x4() {
+  return __riscv_vundefined_i16mf2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_i16mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vint16mf2x5_t test_vundefined_i16mf2x5() {
+  return __riscv_vundefined_i16mf2x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_i16mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vint16mf2x6_t test_vundefined_i16mf2x6() {
+  return __riscv_vundefined_i16mf2x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_i16mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vint16mf2x7_t test_vundefined_i16mf2x7() {
+  return __riscv_vundefined_i16mf2x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_i16mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vint16mf2x8_t test_vundefined_i16mf2x8() {
+  return __riscv_vundefined_i16mf2x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_i16m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vint16m1x2_t test_vundefined_i16m1x2() { return __riscv_vundefined_i16m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_i16m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vint16m1x3_t test_vundefined_i16m1x3() { return __riscv_vundefined_i16m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_i16m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vint16m1x4_t test_vundefined_i16m1x4() { return __riscv_vundefined_i16m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_i16m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vint16m1x5_t test_vundefined_i16m1x5() { return __riscv_vundefined_i16m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_i16m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vint16m1x6_t test_vundefined_i16m1x6() { return __riscv_vundefined_i16m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_i16m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vint16m1x7_t test_vundefined_i16m1x7() { return __riscv_vundefined_i16m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_i16m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vint16m1x8_t test_vundefined_i16m1x8() { return __riscv_vundefined_i16m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i16>, <vscale x 8 x i16> } @test_vundefined_i16m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16> } poison
+//
+vint16m2x2_t test_vundefined_i16m2x2() { return __riscv_vundefined_i16m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } @test_vundefined_i16m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison
+//
+vint16m2x3_t test_vundefined_i16m2x3() { return __riscv_vundefined_i16m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } @test_vundefined_i16m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison
+//
+vint16m2x4_t test_vundefined_i16m2x4() { return __riscv_vundefined_i16m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i16>, <vscale x 16 x i16> } @test_vundefined_i16m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i16>, <vscale x 16 x i16> } poison
+//
+vint16m4x2_t test_vundefined_i16m4x2() { return __riscv_vundefined_i16m4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_i32mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vint32mf2x2_t test_vundefined_i32mf2x2() {
+  return __riscv_vundefined_i32mf2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_i32mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vint32mf2x3_t test_vundefined_i32mf2x3() {
+  return __riscv_vundefined_i32mf2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_i32mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vint32mf2x4_t test_vundefined_i32mf2x4() {
+  return __riscv_vundefined_i32mf2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_i32mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vint32mf2x5_t test_vundefined_i32mf2x5() {
+  return __riscv_vundefined_i32mf2x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_i32mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vint32mf2x6_t test_vundefined_i32mf2x6() {
+  return __riscv_vundefined_i32mf2x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_i32mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vint32mf2x7_t test_vundefined_i32mf2x7() {
+  return __riscv_vundefined_i32mf2x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_i32mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vint32mf2x8_t test_vundefined_i32mf2x8() {
+  return __riscv_vundefined_i32mf2x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_i32m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vint32m1x2_t test_vundefined_i32m1x2() { return __riscv_vundefined_i32m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_i32m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vint32m1x3_t test_vundefined_i32m1x3() { return __riscv_vundefined_i32m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_i32m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vint32m1x4_t test_vundefined_i32m1x4() { return __riscv_vundefined_i32m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_i32m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vint32m1x5_t test_vundefined_i32m1x5() { return __riscv_vundefined_i32m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_i32m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vint32m1x6_t test_vundefined_i32m1x6() { return __riscv_vundefined_i32m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_i32m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vint32m1x7_t test_vundefined_i32m1x7() { return __riscv_vundefined_i32m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_i32m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vint32m1x8_t test_vundefined_i32m1x8() { return __riscv_vundefined_i32m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i32>, <vscale x 4 x i32> } @test_vundefined_i32m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32> } poison
+//
+vint32m2x2_t test_vundefined_i32m2x2() { return __riscv_vundefined_i32m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } @test_vundefined_i32m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison
+//
+vint32m2x3_t test_vundefined_i32m2x3() { return __riscv_vundefined_i32m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } @test_vundefined_i32m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison
+//
+vint32m2x4_t test_vundefined_i32m2x4() { return __riscv_vundefined_i32m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i32>, <vscale x 8 x i32> } @test_vundefined_i32m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i32>, <vscale x 8 x i32> } poison
+//
+vint32m4x2_t test_vundefined_i32m4x2() { return __riscv_vundefined_i32m4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_i64m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vint64m1x2_t test_vundefined_i64m1x2() { return __riscv_vundefined_i64m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_i64m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vint64m1x3_t test_vundefined_i64m1x3() { return __riscv_vundefined_i64m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_i64m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vint64m1x4_t test_vundefined_i64m1x4() { return __riscv_vundefined_i64m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_i64m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vint64m1x5_t test_vundefined_i64m1x5() { return __riscv_vundefined_i64m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_i64m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vint64m1x6_t test_vundefined_i64m1x6() { return __riscv_vundefined_i64m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_i64m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vint64m1x7_t test_vundefined_i64m1x7() { return __riscv_vundefined_i64m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_i64m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vint64m1x8_t test_vundefined_i64m1x8() { return __riscv_vundefined_i64m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i64>, <vscale x 2 x i64> } @test_vundefined_i64m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64> } poison
+//
+vint64m2x2_t test_vundefined_i64m2x2() { return __riscv_vundefined_i64m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } @test_vundefined_i64m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison
+//
+vint64m2x3_t test_vundefined_i64m2x3() { return __riscv_vundefined_i64m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } @test_vundefined_i64m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison
+//
+vint64m2x4_t test_vundefined_i64m2x4() { return __riscv_vundefined_i64m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i64>, <vscale x 4 x i64> } @test_vundefined_i64m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i64>, <vscale x 4 x i64> } poison
+//
+vint64m4x2_t test_vundefined_i64m4x2() { return __riscv_vundefined_i64m4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_u8mf8x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vuint8mf8x2_t test_vundefined_u8mf8x2() { return __riscv_vundefined_u8mf8x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_u8mf8x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vuint8mf8x3_t test_vundefined_u8mf8x3() { return __riscv_vundefined_u8mf8x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_u8mf8x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vuint8mf8x4_t test_vundefined_u8mf8x4() { return __riscv_vundefined_u8mf8x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_u8mf8x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vuint8mf8x5_t test_vundefined_u8mf8x5() { return __riscv_vundefined_u8mf8x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_u8mf8x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vuint8mf8x6_t test_vundefined_u8mf8x6() { return __riscv_vundefined_u8mf8x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_u8mf8x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vuint8mf8x7_t test_vundefined_u8mf8x7() { return __riscv_vundefined_u8mf8x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } @test_vundefined_u8mf8x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i8> } poison
+//
+vuint8mf8x8_t test_vundefined_u8mf8x8() { return __riscv_vundefined_u8mf8x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_u8mf4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vuint8mf4x2_t test_vundefined_u8mf4x2() { return __riscv_vundefined_u8mf4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_u8mf4x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vuint8mf4x3_t test_vundefined_u8mf4x3() { return __riscv_vundefined_u8mf4x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_u8mf4x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vuint8mf4x4_t test_vundefined_u8mf4x4() { return __riscv_vundefined_u8mf4x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_u8mf4x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vuint8mf4x5_t test_vundefined_u8mf4x5() { return __riscv_vundefined_u8mf4x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_u8mf4x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vuint8mf4x6_t test_vundefined_u8mf4x6() { return __riscv_vundefined_u8mf4x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_u8mf4x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vuint8mf4x7_t test_vundefined_u8mf4x7() { return __riscv_vundefined_u8mf4x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } @test_vundefined_u8mf4x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8> } poison
+//
+vuint8mf4x8_t test_vundefined_u8mf4x8() { return __riscv_vundefined_u8mf4x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_u8mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vuint8mf2x2_t test_vundefined_u8mf2x2() { return __riscv_vundefined_u8mf2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_u8mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vuint8mf2x3_t test_vundefined_u8mf2x3() { return __riscv_vundefined_u8mf2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_u8mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vuint8mf2x4_t test_vundefined_u8mf2x4() { return __riscv_vundefined_u8mf2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_u8mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vuint8mf2x5_t test_vundefined_u8mf2x5() { return __riscv_vundefined_u8mf2x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_u8mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vuint8mf2x6_t test_vundefined_u8mf2x6() { return __riscv_vundefined_u8mf2x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_u8mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vuint8mf2x7_t test_vundefined_u8mf2x7() { return __riscv_vundefined_u8mf2x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } @test_vundefined_u8mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i8> } poison
+//
+vuint8mf2x8_t test_vundefined_u8mf2x8() { return __riscv_vundefined_u8mf2x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_u8m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vuint8m1x2_t test_vundefined_u8m1x2() { return __riscv_vundefined_u8m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_u8m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vuint8m1x3_t test_vundefined_u8m1x3() { return __riscv_vundefined_u8m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_u8m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vuint8m1x4_t test_vundefined_u8m1x4() { return __riscv_vundefined_u8m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_u8m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vuint8m1x5_t test_vundefined_u8m1x5() { return __riscv_vundefined_u8m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_u8m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vuint8m1x6_t test_vundefined_u8m1x6() { return __riscv_vundefined_u8m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_u8m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vuint8m1x7_t test_vundefined_u8m1x7() { return __riscv_vundefined_u8m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } @test_vundefined_u8m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8> } poison
+//
+vuint8m1x8_t test_vundefined_u8m1x8() { return __riscv_vundefined_u8m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i8>, <vscale x 16 x i8> } @test_vundefined_u8m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8> } poison
+//
+vuint8m2x2_t test_vundefined_u8m2x2() { return __riscv_vundefined_u8m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } @test_vundefined_u8m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison
+//
+vuint8m2x3_t test_vundefined_u8m2x3() { return __riscv_vundefined_u8m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } @test_vundefined_u8m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } poison
+//
+vuint8m2x4_t test_vundefined_u8m2x4() { return __riscv_vundefined_u8m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 32 x i8>, <vscale x 32 x i8> } @test_vundefined_u8m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 32 x i8>, <vscale x 32 x i8> } poison
+//
+vuint8m4x2_t test_vundefined_u8m4x2() { return __riscv_vundefined_u8m4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_u16mf4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vuint16mf4x2_t test_vundefined_u16mf4x2() {
+  return __riscv_vundefined_u16mf4x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_u16mf4x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vuint16mf4x3_t test_vundefined_u16mf4x3() {
+  return __riscv_vundefined_u16mf4x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_u16mf4x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vuint16mf4x4_t test_vundefined_u16mf4x4() {
+  return __riscv_vundefined_u16mf4x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_u16mf4x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vuint16mf4x5_t test_vundefined_u16mf4x5() {
+  return __riscv_vundefined_u16mf4x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_u16mf4x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vuint16mf4x6_t test_vundefined_u16mf4x6() {
+  return __riscv_vundefined_u16mf4x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_u16mf4x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vuint16mf4x7_t test_vundefined_u16mf4x7() {
+  return __riscv_vundefined_u16mf4x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } @test_vundefined_u16mf4x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i16> } poison
+//
+vuint16mf4x8_t test_vundefined_u16mf4x8() {
+  return __riscv_vundefined_u16mf4x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_u16mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vuint16mf2x2_t test_vundefined_u16mf2x2() {
+  return __riscv_vundefined_u16mf2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_u16mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vuint16mf2x3_t test_vundefined_u16mf2x3() {
+  return __riscv_vundefined_u16mf2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_u16mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vuint16mf2x4_t test_vundefined_u16mf2x4() {
+  return __riscv_vundefined_u16mf2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_u16mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vuint16mf2x5_t test_vundefined_u16mf2x5() {
+  return __riscv_vundefined_u16mf2x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_u16mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vuint16mf2x6_t test_vundefined_u16mf2x6() {
+  return __riscv_vundefined_u16mf2x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_u16mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vuint16mf2x7_t test_vundefined_u16mf2x7() {
+  return __riscv_vundefined_u16mf2x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } @test_vundefined_u16mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i16> } poison
+//
+vuint16mf2x8_t test_vundefined_u16mf2x8() {
+  return __riscv_vundefined_u16mf2x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_u16m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vuint16m1x2_t test_vundefined_u16m1x2() { return __riscv_vundefined_u16m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_u16m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vuint16m1x3_t test_vundefined_u16m1x3() { return __riscv_vundefined_u16m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_u16m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vuint16m1x4_t test_vundefined_u16m1x4() { return __riscv_vundefined_u16m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_u16m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vuint16m1x5_t test_vundefined_u16m1x5() { return __riscv_vundefined_u16m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_u16m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vuint16m1x6_t test_vundefined_u16m1x6() { return __riscv_vundefined_u16m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_u16m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vuint16m1x7_t test_vundefined_u16m1x7() { return __riscv_vundefined_u16m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } @test_vundefined_u16m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i16> } poison
+//
+vuint16m1x8_t test_vundefined_u16m1x8() { return __riscv_vundefined_u16m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i16>, <vscale x 8 x i16> } @test_vundefined_u16m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16> } poison
+//
+vuint16m2x2_t test_vundefined_u16m2x2() { return __riscv_vundefined_u16m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } @test_vundefined_u16m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison
+//
+vuint16m2x3_t test_vundefined_u16m2x3() { return __riscv_vundefined_u16m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } @test_vundefined_u16m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } poison
+//
+vuint16m2x4_t test_vundefined_u16m2x4() { return __riscv_vundefined_u16m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 16 x i16>, <vscale x 16 x i16> } @test_vundefined_u16m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 16 x i16>, <vscale x 16 x i16> } poison
+//
+vuint16m4x2_t test_vundefined_u16m4x2() { return __riscv_vundefined_u16m4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_u32mf2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vuint32mf2x2_t test_vundefined_u32mf2x2() {
+  return __riscv_vundefined_u32mf2x2();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_u32mf2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vuint32mf2x3_t test_vundefined_u32mf2x3() {
+  return __riscv_vundefined_u32mf2x3();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_u32mf2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vuint32mf2x4_t test_vundefined_u32mf2x4() {
+  return __riscv_vundefined_u32mf2x4();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_u32mf2x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vuint32mf2x5_t test_vundefined_u32mf2x5() {
+  return __riscv_vundefined_u32mf2x5();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_u32mf2x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vuint32mf2x6_t test_vundefined_u32mf2x6() {
+  return __riscv_vundefined_u32mf2x6();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_u32mf2x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vuint32mf2x7_t test_vundefined_u32mf2x7() {
+  return __riscv_vundefined_u32mf2x7();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } @test_vundefined_u32mf2x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32> } poison
+//
+vuint32mf2x8_t test_vundefined_u32mf2x8() {
+  return __riscv_vundefined_u32mf2x8();
+}
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_u32m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vuint32m1x2_t test_vundefined_u32m1x2() { return __riscv_vundefined_u32m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_u32m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vuint32m1x3_t test_vundefined_u32m1x3() { return __riscv_vundefined_u32m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_u32m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vuint32m1x4_t test_vundefined_u32m1x4() { return __riscv_vundefined_u32m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_u32m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vuint32m1x5_t test_vundefined_u32m1x5() { return __riscv_vundefined_u32m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_u32m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vuint32m1x6_t test_vundefined_u32m1x6() { return __riscv_vundefined_u32m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_u32m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vuint32m1x7_t test_vundefined_u32m1x7() { return __riscv_vundefined_u32m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test_vundefined_u32m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } poison
+//
+vuint32m1x8_t test_vundefined_u32m1x8() { return __riscv_vundefined_u32m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i32>, <vscale x 4 x i32> } @test_vundefined_u32m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32> } poison
+//
+vuint32m2x2_t test_vundefined_u32m2x2() { return __riscv_vundefined_u32m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } @test_vundefined_u32m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison
+//
+vuint32m2x3_t test_vundefined_u32m2x3() { return __riscv_vundefined_u32m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } @test_vundefined_u32m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } poison
+//
+vuint32m2x4_t test_vundefined_u32m2x4() { return __riscv_vundefined_u32m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 8 x i32>, <vscale x 8 x i32> } @test_vundefined_u32m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 8 x i32>, <vscale x 8 x i32> } poison
+//
+vuint32m4x2_t test_vundefined_u32m4x2() { return __riscv_vundefined_u32m4x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_u64m1x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vuint64m1x2_t test_vundefined_u64m1x2() { return __riscv_vundefined_u64m1x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_u64m1x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vuint64m1x3_t test_vundefined_u64m1x3() { return __riscv_vundefined_u64m1x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_u64m1x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vuint64m1x4_t test_vundefined_u64m1x4() { return __riscv_vundefined_u64m1x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_u64m1x5(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vuint64m1x5_t test_vundefined_u64m1x5() { return __riscv_vundefined_u64m1x5(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_u64m1x6(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vuint64m1x6_t test_vundefined_u64m1x6() { return __riscv_vundefined_u64m1x6(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_u64m1x7(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vuint64m1x7_t test_vundefined_u64m1x7() { return __riscv_vundefined_u64m1x7(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } @test_vundefined_u64m1x8(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64> } poison
+//
+vuint64m1x8_t test_vundefined_u64m1x8() { return __riscv_vundefined_u64m1x8(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i64>, <vscale x 2 x i64> } @test_vundefined_u64m2x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64> } poison
+//
+vuint64m2x2_t test_vundefined_u64m2x2() { return __riscv_vundefined_u64m2x2(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } @test_vundefined_u64m2x3(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison
+//
+vuint64m2x3_t test_vundefined_u64m2x3() { return __riscv_vundefined_u64m2x3(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } @test_vundefined_u64m2x4(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } poison
+//
+vuint64m2x4_t test_vundefined_u64m2x4() { return __riscv_vundefined_u64m2x4(); }
+
+// CHECK-RV64-LABEL: define dso_local { <vscale x 4 x i64>, <vscale x 4 x i64> } @test_vundefined_u64m4x2(
+// CHECK-RV64-SAME: ) #[[ATTR0]] {
+// CHECK-RV64-NEXT:  entry:
+// CHECK-RV64-NEXT:    ret { <vscale x 4 x i64>, <vscale x 4 x i64> } poison
+//
+vuint64m4x2_t test_vundefined_u64m4x2() { return __riscv_vundefined_u64m4x2(); }


        


More information about the cfe-commits mailing list