diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
index 146a5459930fe31576eacaf4b9260bdfc570e3ef..6a20a613f8321adcc8aeff00266bf2c014c2a975 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
@@ -234,7 +234,7 @@ public:
   }
 };
 
-class svpsel_impl : public function_base
+class svpsel_lane_impl : public function_base
 {
 public:
   rtx
@@ -625,7 +625,7 @@ FUNCTION (svpmullb, unspec_based_function, (-1, UNSPEC_PMULLB, -1))
 FUNCTION (svpmullb_pair, unspec_based_function, (-1, UNSPEC_PMULLB_PAIR, -1))
 FUNCTION (svpmullt, unspec_based_function, (-1, UNSPEC_PMULLT, -1))
 FUNCTION (svpmullt_pair, unspec_based_function, (-1, UNSPEC_PMULLT_PAIR, -1))
-FUNCTION (svpsel, svpsel_impl,)
+FUNCTION (svpsel_lane, svpsel_lane_impl,)
 FUNCTION (svqabs, rtx_code_function, (SS_ABS, UNKNOWN, UNKNOWN))
 FUNCTION (svqcadd, svqcadd_impl,)
 FUNCTION (svqcvt, integer_conversion, (UNSPEC_SQCVT, UNSPEC_SQCVTU,
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.def b/gcc/config/aarch64/aarch64-sve-builtins-sve2.def
index 4543402f836f0fb1eb86fff3b3d0c7bcb67877c5..318dfff06f0d82d46ef37af6849678baaa4ea461 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.def
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.def
@@ -235,7 +235,7 @@ DEF_SVE_FUNCTION (svsm4ekey, binary, s_unsigned, none)
 			     | AARCH64_FL_SME \
 			     | AARCH64_FL_SM_ON)
 DEF_SVE_FUNCTION (svclamp, clamp, all_integer, none)
-DEF_SVE_FUNCTION (svpsel, select_pred, all_pred_count, none)
+DEF_SVE_FUNCTION (svpsel_lane, select_pred, all_pred_count, none)
 DEF_SVE_FUNCTION (svrevd, unary, all_data, mxz)
 #undef REQUIRED_EXTENSIONS
 
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.h b/gcc/config/aarch64/aarch64-sve-builtins-sve2.h
index 2ac6edeb8db0efa809b3a56c9f4bd67d3d899a58..013a9dfc5fa980d94d5a28a26f7ea0fc3587b4b8 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.h
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.h
@@ -106,7 +106,7 @@ namespace aarch64_sve
     extern const function_base *const svpmullb_pair;
     extern const function_base *const svpmullt;
     extern const function_base *const svpmullt_pair;
-    extern const function_base *const svpsel;
+    extern const function_base *const svpsel_lane;
     extern const function_base *const svqabs;
     extern const function_base *const svqcadd;
     extern const function_base *const svqcvt;
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b16.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b16.c
deleted file mode 100644
index 5df2aa0b59651136ca37068216fe0dd3683bc7b4..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b16.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.h\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svbool_t,
-	       p0 = svpsel_b16 (p2, p7, 0),
-	       p0 = svpsel_b16 (p2, p7, 0))
-
-/*
-** psel_p2_p7_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p7, p8\.h\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p7_p8_w11, svbool_t,
-	       p2 = svpsel_b16 (p7, p8, w11),
-	       p2 = svpsel_b16 (p7, p8, w11))
-
-/*
-** psel_p7_p8_p13_w12:
-**	psel	p7, p8, p13\.h\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p7_p8_p13_w12, svbool_t,
-	       p7 = svpsel_b16 (p8, p13, w12),
-	       p7 = svpsel_b16 (p8, p13, w12))
-
-/*
-** psel_p8_p13_p15_w15:
-**	psel	p8, p13, p15\.h\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p8_p13_p15_w15, svbool_t,
-	       p8 = svpsel_b16 (p13, p15, w15),
-	       p8 = svpsel_b16 (p13, p15, w15))
-
-/*
-** psel_p13_p15_p0_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p13, p15, p0\.h\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p15_p0_w16, svbool_t,
-	       p13 = svpsel_b16 (p15, p0, w16),
-	       p13 = svpsel_b16 (p15, p0, w16))
-
-/*
-** psel_p15_p13_p8_w12p1:
-**	psel	p15, p13, p8\.h\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p13_p8_w12p1, svbool_t,
-	       p15 = svpsel_b16 (p13, p8, w12 + 1),
-	       p15 = svpsel_b16 (p13, p8, w12 + 1))
-
-/*
-** psel_p13_p8_p7_w12p7:
-**	psel	p13, p8, p7\.h\[w12, 7\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p8_p7_w12p7, svbool_t,
-	       p13 = svpsel_b16 (p8, p7, w12 + 7),
-	       p13 = svpsel_b16 (p8, p7, w12 + 7))
-
-/*
-** psel_p0_p0_p0_w12p8:
-**	add	(w[0-9]+), w12, #?8
-**	psel	p0, p0, p0\.h\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p0_w12p8, svbool_t,
-	       p0 = svpsel_b16 (p0, p0, w12 + 8),
-	       p0 = svpsel_b16 (p0, p0, w12 + 8))
-
-/*
-** psel_p15_p15_p15_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p15, p15, p15\.h\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p15_p15_w12m1, svbool_t,
-	       p15 = svpsel_b16 (p15, p15, w12 - 1),
-	       p15 = svpsel_b16 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b32.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b32.c
deleted file mode 100644
index 8489dca008629caee6e1ba21dc1d25f1d9eaee86..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b32.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.s\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svbool_t,
-	       p0 = svpsel_b32 (p2, p7, 0),
-	       p0 = svpsel_b32 (p2, p7, 0))
-
-/*
-** psel_p2_p7_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p7, p8\.s\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p7_p8_w11, svbool_t,
-	       p2 = svpsel_b32 (p7, p8, w11),
-	       p2 = svpsel_b32 (p7, p8, w11))
-
-/*
-** psel_p7_p8_p13_w12:
-**	psel	p7, p8, p13\.s\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p7_p8_p13_w12, svbool_t,
-	       p7 = svpsel_b32 (p8, p13, w12),
-	       p7 = svpsel_b32 (p8, p13, w12))
-
-/*
-** psel_p8_p13_p15_w15:
-**	psel	p8, p13, p15\.s\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p8_p13_p15_w15, svbool_t,
-	       p8 = svpsel_b32 (p13, p15, w15),
-	       p8 = svpsel_b32 (p13, p15, w15))
-
-/*
-** psel_p13_p15_p0_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p13, p15, p0\.s\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p15_p0_w16, svbool_t,
-	       p13 = svpsel_b32 (p15, p0, w16),
-	       p13 = svpsel_b32 (p15, p0, w16))
-
-/*
-** psel_p15_p13_p8_w12p1:
-**	psel	p15, p13, p8\.s\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p13_p8_w12p1, svbool_t,
-	       p15 = svpsel_b32 (p13, p8, w12 + 1),
-	       p15 = svpsel_b32 (p13, p8, w12 + 1))
-
-/*
-** psel_p13_p8_p7_w12p3:
-**	psel	p13, p8, p7\.s\[w12, 3\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p8_p7_w12p3, svbool_t,
-	       p13 = svpsel_b32 (p8, p7, w12 + 3),
-	       p13 = svpsel_b32 (p8, p7, w12 + 3))
-
-/*
-** psel_p0_p0_p0_w12p4:
-**	add	(w[0-9]+), w12, #?4
-**	psel	p0, p0, p0\.s\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p0_w12p4, svbool_t,
-	       p0 = svpsel_b32 (p0, p0, w12 + 4),
-	       p0 = svpsel_b32 (p0, p0, w12 + 4))
-
-/*
-** psel_p15_p15_p15_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p15, p15, p15\.s\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p15_p15_w12m1, svbool_t,
-	       p15 = svpsel_b32 (p15, p15, w12 - 1),
-	       p15 = svpsel_b32 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b64.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b64.c
deleted file mode 100644
index 5d2d8b48f50e3868c8895a2577ee647d8df932d1..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b64.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.d\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svbool_t,
-	       p0 = svpsel_b64 (p2, p7, 0),
-	       p0 = svpsel_b64 (p2, p7, 0))
-
-/*
-** psel_p2_p7_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p7, p8\.d\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p7_p8_w11, svbool_t,
-	       p2 = svpsel_b64 (p7, p8, w11),
-	       p2 = svpsel_b64 (p7, p8, w11))
-
-/*
-** psel_p7_p8_p13_w12:
-**	psel	p7, p8, p13\.d\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p7_p8_p13_w12, svbool_t,
-	       p7 = svpsel_b64 (p8, p13, w12),
-	       p7 = svpsel_b64 (p8, p13, w12))
-
-/*
-** psel_p8_p13_p15_w15:
-**	psel	p8, p13, p15\.d\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p8_p13_p15_w15, svbool_t,
-	       p8 = svpsel_b64 (p13, p15, w15),
-	       p8 = svpsel_b64 (p13, p15, w15))
-
-/*
-** psel_p13_p15_p0_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p13, p15, p0\.d\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p15_p0_w16, svbool_t,
-	       p13 = svpsel_b64 (p15, p0, w16),
-	       p13 = svpsel_b64 (p15, p0, w16))
-
-/*
-** psel_p15_p13_p8_w12p1:
-**	psel	p15, p13, p8\.d\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p13_p8_w12p1, svbool_t,
-	       p15 = svpsel_b64 (p13, p8, w12 + 1),
-	       p15 = svpsel_b64 (p13, p8, w12 + 1))
-
-/*
-** psel_p0_p0_p0_w12p2:
-**	add	(w[0-9]+), w12, #?2
-**	psel	p0, p0, p0\.d\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p0_w12p2, svbool_t,
-	       p0 = svpsel_b64 (p0, p0, w12 + 2),
-	       p0 = svpsel_b64 (p0, p0, w12 + 2))
-
-/*
-** psel_p15_p15_p15_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p15, p15, p15\.d\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p15_p15_w12m1, svbool_t,
-	       p15 = svpsel_b64 (p15, p15, w12 - 1),
-	       p15 = svpsel_b64 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b8.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b8.c
deleted file mode 100644
index 438735893c93f6e84b7fc6f8c069ae294fa2f356..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_b8.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.b\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svbool_t,
-	       p0 = svpsel_b8 (p2, p7, 0),
-	       p0 = svpsel_b8 (p2, p7, 0))
-
-/*
-** psel_p2_p7_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p7, p8\.b\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p7_p8_w11, svbool_t,
-	       p2 = svpsel_b8 (p7, p8, w11),
-	       p2 = svpsel_b8 (p7, p8, w11))
-
-/*
-** psel_p7_p8_p13_w12:
-**	psel	p7, p8, p13\.b\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p7_p8_p13_w12, svbool_t,
-	       p7 = svpsel_b8 (p8, p13, w12),
-	       p7 = svpsel_b8 (p8, p13, w12))
-
-/*
-** psel_p8_p13_p15_w15:
-**	psel	p8, p13, p15\.b\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p8_p13_p15_w15, svbool_t,
-	       p8 = svpsel_b8 (p13, p15, w15),
-	       p8 = svpsel_b8 (p13, p15, w15))
-
-/*
-** psel_p13_p15_p0_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p13, p15, p0\.b\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p15_p0_w16, svbool_t,
-	       p13 = svpsel_b8 (p15, p0, w16),
-	       p13 = svpsel_b8 (p15, p0, w16))
-
-/*
-** psel_p15_p13_p8_w12p1:
-**	psel	p15, p13, p8\.b\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p13_p8_w12p1, svbool_t,
-	       p15 = svpsel_b8 (p13, p8, w12 + 1),
-	       p15 = svpsel_b8 (p13, p8, w12 + 1))
-
-/*
-** psel_p13_p8_p7_w12p15:
-**	psel	p13, p8, p7\.b\[w12, 15\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p8_p7_w12p15, svbool_t,
-	       p13 = svpsel_b8 (p8, p7, w12 + 15),
-	       p13 = svpsel_b8 (p8, p7, w12 + 15))
-
-/*
-** psel_p0_p0_p0_w12p16:
-**	add	(w[0-9]+), w12, #?16
-**	psel	p0, p0, p0\.b\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p0_w12p16, svbool_t,
-	       p0 = svpsel_b8 (p0, p0, w12 + 16),
-	       p0 = svpsel_b8 (p0, p0, w12 + 16))
-
-/*
-** psel_p15_p15_p15_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p15, p15, p15\.b\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p15_p15_p15_w12m1, svbool_t,
-	       p15 = svpsel_b8 (p15, p15, w12 - 1),
-	       p15 = svpsel_b8 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c16.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c16.c
deleted file mode 100644
index 1cf45e6c28385d026dff01894878fe8be12b75f9..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c16.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.h\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svcount_t,
-	       p0 = svpsel_c16 (p2, p7, 0),
-	       p0 = svpsel_c16 (p2, p7, 0))
-
-/*
-** psel_p2_p0_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p0, p8\.h\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p0_p8_w11, svcount_t,
-	       p2 = svpsel_c16 (p0, p8, w11),
-	       p2 = svpsel_c16 (p0, p8, w11))
-
-/*
-** psel_p2_p13_p15_w12:
-**	psel	p2, p13, p15\.h\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p13_p15_w12, svcount_t,
-	       p2 = svpsel_c16 (p13, p15, w12),
-	       p2 = svpsel_c16 (p13, p15, w12))
-
-/*
-** psel_p0_p13_p15_w15:
-**	psel	p0, p13, p15\.h\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p13_p15_w15, svcount_t,
-	       p0 = svpsel_c16 (p13, p15, w15),
-	       p0 = svpsel_c16 (p13, p15, w15))
-
-/*
-** psel_p13_p0_p15_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p13, p0, p15\.h\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p0_p15_w16, svcount_t,
-	       p13 = svpsel_c16 (p0, p15, w16),
-	       p13 = svpsel_c16 (p0, p15, w16))
-
-/*
-** psel_p2_p13_p8_w12p1:
-**	psel	p2, p13, p8\.h\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p13_p8_w12p1, svcount_t,
-	       p2 = svpsel_c16 (p13, p8, w12 + 1),
-	       p2 = svpsel_c16 (p13, p8, w12 + 1))
-
-/*
-** psel_p13_p0_p7_w12p7:
-**	psel	p13, p0, p7\.h\[w12, 7\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p0_p7_w12p7, svcount_t,
-	       p13 = svpsel_c16 (p0, p7, w12 + 7),
-	       p13 = svpsel_c16 (p0, p7, w12 + 7))
-
-/*
-** psel_p0_p0_p15_w12p8:
-**	add	(w[0-9]+), w12, #?8
-**	psel	p0, p0, p15\.h\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p15_w12p8, svcount_t,
-	       p0 = svpsel_c16 (p0, p15, w12 + 8),
-	       p0 = svpsel_c16 (p0, p15, w12 + 8))
-
-/*
-** psel_p13_p13_p7_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p13, p13, p7\.h\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p13_p7_w12m1, svcount_t,
-	       p13 = svpsel_c16 (p13, p7, w12 - 1),
-	       p13 = svpsel_c16 (p13, p7, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c32.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c32.c
deleted file mode 100644
index 5246a031595abed303d3ca8ab55b3434f1f6e229..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c32.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.s\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svcount_t,
-	       p0 = svpsel_c32 (p2, p7, 0),
-	       p0 = svpsel_c32 (p2, p7, 0))
-
-/*
-** psel_p2_p13_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p13, p8\.s\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p13_p8_w11, svcount_t,
-	       p2 = svpsel_c32 (p13, p8, w11),
-	       p2 = svpsel_c32 (p13, p8, w11))
-
-/*
-** psel_p0_p13_p15_w12:
-**	psel	p0, p13, p15\.s\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p13_p15_w12, svcount_t,
-	       p0 = svpsel_c32 (p13, p15, w12),
-	       p0 = svpsel_c32 (p13, p15, w12))
-
-/*
-** psel_p2_p0_p15_w15:
-**	psel	p2, p0, p15\.s\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p0_p15_w15, svcount_t,
-	       p2 = svpsel_c32 (p0, p15, w15),
-	       p2 = svpsel_c32 (p0, p15, w15))
-
-/*
-** psel_p13_p0_p7_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p13, p0, p7\.s\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p0_p7_w16, svcount_t,
-	       p13 = svpsel_c32 (p0, p7, w16),
-	       p13 = svpsel_c32 (p0, p7, w16))
-
-/*
-** psel_p2_p13_p8_w12p1:
-**	psel	p2, p13, p8\.s\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p13_p8_w12p1, svcount_t,
-	       p2 = svpsel_c32 (p13, p8, w12 + 1),
-	       p2 = svpsel_c32 (p13, p8, w12 + 1))
-
-/*
-** psel_p13_p0_p7_w12p3:
-**	psel	p13, p0, p7\.s\[w12, 3\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p0_p7_w12p3, svcount_t,
-	       p13 = svpsel_c32 (p0, p7, w12 + 3),
-	       p13 = svpsel_c32 (p0, p7, w12 + 3))
-
-/*
-** psel_p0_p0_p7_w12p4:
-**	add	(w[0-9]+), w12, #?4
-**	psel	p0, p0, p7\.s\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p7_w12p4, svcount_t,
-	       p0 = svpsel_c32 (p0, p7, w12 + 4),
-	       p0 = svpsel_c32 (p0, p7, w12 + 4))
-
-/*
-** psel_p13_p13_p15_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p13, p13, p15\.s\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p13_p15_w12m1, svcount_t,
-	       p13 = svpsel_c32 (p13, p15, w12 - 1),
-	       p13 = svpsel_c32 (p13, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c64.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c64.c
deleted file mode 100644
index 97304fd1646233c522568043bbce0a01376f1ccf..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c64.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.d\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svcount_t,
-	       p0 = svpsel_c64 (p2, p7, 0),
-	       p0 = svpsel_c64 (p2, p7, 0))
-
-/*
-** psel_p2_p13_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p13, p8\.d\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p13_p8_w11, svcount_t,
-	       p2 = svpsel_c64 (p13, p8, w11),
-	       p2 = svpsel_c64 (p13, p8, w11))
-
-/*
-** psel_p2_p0_p15_w12:
-**	psel	p2, p0, p15\.d\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p0_p15_w12, svcount_t,
-	       p2 = svpsel_c64 (p0, p15, w12),
-	       p2 = svpsel_c64 (p0, p15, w12))
-
-/*
-** psel_p0_p13_p15_w15:
-**	psel	p0, p13, p15\.d\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p13_p15_w15, svcount_t,
-	       p0 = svpsel_c64 (p13, p15, w15),
-	       p0 = svpsel_c64 (p13, p15, w15))
-
-/*
-** psel_p13_p0_p15_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p13, p0, p15\.d\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p0_p15_w16, svcount_t,
-	       p13 = svpsel_c64 (p0, p15, w16),
-	       p13 = svpsel_c64 (p0, p15, w16))
-
-/*
-** psel_p2_p13_p8_w12p1:
-**	psel	p2, p13, p8\.d\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p13_p8_w12p1, svcount_t,
-	       p2 = svpsel_c64 (p13, p8, w12 + 1),
-	       p2 = svpsel_c64 (p13, p8, w12 + 1))
-
-/*
-** psel_p0_p0_p8_w12p2:
-**	add	(w[0-9]+), w12, #?2
-**	psel	p0, p0, p8\.d\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p8_w12p2, svcount_t,
-	       p0 = svpsel_c64 (p0, p8, w12 + 2),
-	       p0 = svpsel_c64 (p0, p8, w12 + 2))
-
-/*
-** psel_p13_p13_p15_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p13, p13, p15\.d\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p13_p15_w12m1, svcount_t,
-	       p13 = svpsel_c64 (p13, p15, w12 - 1),
-	       p13 = svpsel_c64 (p13, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c8.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c8.c
deleted file mode 100644
index 95973a17ebd87301ddc50b1da9f49ddc245f9d0f..0000000000000000000000000000000000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_c8.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** psel_p0_p2_p7_0:
-**	mov	[wx](1[2-5]), #?0
-**	psel	p0, p2, p7\.b\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p2_p7_0, svcount_t,
-	       p0 = svpsel_c8 (p2, p7, 0),
-	       p0 = svpsel_c8 (p2, p7, 0))
-
-/*
-** psel_p2_p0_p8_w11:
-**	mov	[wx](1[2-5]), [wx]11
-**	psel	p2, p0, p8\.b\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p0_p8_w11, svcount_t,
-	       p2 = svpsel_c8 (p0, p8, w11),
-	       p2 = svpsel_c8 (p0, p8, w11))
-
-/*
-** psel_p0_p13_p15_w12:
-**	psel	p0, p13, p15\.b\[w12, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p13_p15_w12, svcount_t,
-	       p0 = svpsel_c8 (p13, p15, w12),
-	       p0 = svpsel_c8 (p13, p15, w12))
-
-/*
-** psel_p13_p0_p8_w15:
-**	psel	p13, p0, p8\.b\[w15, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p0_p8_w15, svcount_t,
-	       p13 = svpsel_c8 (p0, p8, w15),
-	       p13 = svpsel_c8 (p0, p8, w15))
-
-/*
-** psel_p2_p13_p7_w16:
-**	mov	[wx](1[2-5]), [wx]16
-**	psel	p2, p13, p7\.b\[w\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p2_p13_p7_w16, svcount_t,
-	       p2 = svpsel_c8 (p13, p7, w16),
-	       p2 = svpsel_c8 (p13, p7, w16))
-
-/*
-** psel_p0_p13_p8_w12p1:
-**	psel	p0, p13, p8\.b\[w12, 1\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p13_p8_w12p1, svcount_t,
-	       p0 = svpsel_c8 (p13, p8, w12 + 1),
-	       p0 = svpsel_c8 (p13, p8, w12 + 1))
-
-/*
-** psel_p13_p2_p7_w12p15:
-**	psel	p13, p2, p7\.b\[w12, 15\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p2_p7_w12p15, svcount_t,
-	       p13 = svpsel_c8 (p2, p7, w12 + 15),
-	       p13 = svpsel_c8 (p2, p7, w12 + 15))
-
-/*
-** psel_p0_p0_p15_w12p16:
-**	add	(w[0-9]+), w12, #?16
-**	psel	p0, p0, p15\.b\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p0_p0_p15_w12p16, svcount_t,
-	       p0 = svpsel_c8 (p0, p15, w12 + 16),
-	       p0 = svpsel_c8 (p0, p15, w12 + 16))
-
-/*
-** psel_p13_p13_p15_w12m1:
-**	sub	(w[0-9]+), w12, #?1
-**	psel	p13, p13, p15\.b\[\1, 0\]
-**	ret
-*/
-TEST_SELECT_P (psel_p13_p13_p15_w12m1, svcount_t,
-	       p13 = svpsel_c8 (p13, p15, w12 - 1),
-	       p13 = svpsel_c8 (p13, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b16.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b16.c
new file mode 100644
index 0000000000000000000000000000000000000000..704e9e375f5e60a4476868b4f076a2ef18b65250
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b16.c
@@ -0,0 +1,89 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.h\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svbool_t,
+	       p0 = svpsel_lane_b16 (p2, p7, 0),
+	       p0 = svpsel_lane_b16 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p7_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p7, p8\.h\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p7_p8_w11, svbool_t,
+	       p2 = svpsel_lane_b16 (p7, p8, w11),
+	       p2 = svpsel_lane_b16 (p7, p8, w11))
+
+/*
+** psel_lane_p7_p8_p13_w12:
+**	psel	p7, p8, p13\.h\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p7_p8_p13_w12, svbool_t,
+	       p7 = svpsel_lane_b16 (p8, p13, w12),
+	       p7 = svpsel_lane_b16 (p8, p13, w12))
+
+/*
+** psel_lane_p8_p13_p15_w15:
+**	psel	p8, p13, p15\.h\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p8_p13_p15_w15, svbool_t,
+	       p8 = svpsel_lane_b16 (p13, p15, w15),
+	       p8 = svpsel_lane_b16 (p13, p15, w15))
+
+/*
+** psel_lane_p13_p15_p0_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p13, p15, p0\.h\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p15_p0_w16, svbool_t,
+	       p13 = svpsel_lane_b16 (p15, p0, w16),
+	       p13 = svpsel_lane_b16 (p15, p0, w16))
+
+/*
+** psel_lane_p15_p13_p8_w12p1:
+**	psel	p15, p13, p8\.h\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p13_p8_w12p1, svbool_t,
+	       p15 = svpsel_lane_b16 (p13, p8, w12 + 1),
+	       p15 = svpsel_lane_b16 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p13_p8_p7_w12p7:
+**	psel	p13, p8, p7\.h\[w12, 7\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p8_p7_w12p7, svbool_t,
+	       p13 = svpsel_lane_b16 (p8, p7, w12 + 7),
+	       p13 = svpsel_lane_b16 (p8, p7, w12 + 7))
+
+/*
+** psel_lane_p0_p0_p0_w12p8:
+**	add	(w[0-9]+), w12, #?8
+**	psel	p0, p0, p0\.h\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p0_w12p8, svbool_t,
+	       p0 = svpsel_lane_b16 (p0, p0, w12 + 8),
+	       p0 = svpsel_lane_b16 (p0, p0, w12 + 8))
+
+/*
+** psel_lane_p15_p15_p15_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p15, p15, p15\.h\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p15_p15_w12m1, svbool_t,
+	       p15 = svpsel_lane_b16 (p15, p15, w12 - 1),
+	       p15 = svpsel_lane_b16 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b32.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b32.c
new file mode 100644
index 0000000000000000000000000000000000000000..7d9c7a129ea4469201957d5ac9e75f9d5b7cf116
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b32.c
@@ -0,0 +1,89 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.s\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svbool_t,
+	       p0 = svpsel_lane_b32 (p2, p7, 0),
+	       p0 = svpsel_lane_b32 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p7_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p7, p8\.s\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p7_p8_w11, svbool_t,
+	       p2 = svpsel_lane_b32 (p7, p8, w11),
+	       p2 = svpsel_lane_b32 (p7, p8, w11))
+
+/*
+** psel_lane_p7_p8_p13_w12:
+**	psel	p7, p8, p13\.s\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p7_p8_p13_w12, svbool_t,
+	       p7 = svpsel_lane_b32 (p8, p13, w12),
+	       p7 = svpsel_lane_b32 (p8, p13, w12))
+
+/*
+** psel_lane_p8_p13_p15_w15:
+**	psel	p8, p13, p15\.s\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p8_p13_p15_w15, svbool_t,
+	       p8 = svpsel_lane_b32 (p13, p15, w15),
+	       p8 = svpsel_lane_b32 (p13, p15, w15))
+
+/*
+** psel_lane_p13_p15_p0_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p13, p15, p0\.s\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p15_p0_w16, svbool_t,
+	       p13 = svpsel_lane_b32 (p15, p0, w16),
+	       p13 = svpsel_lane_b32 (p15, p0, w16))
+
+/*
+** psel_lane_p15_p13_p8_w12p1:
+**	psel	p15, p13, p8\.s\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p13_p8_w12p1, svbool_t,
+	       p15 = svpsel_lane_b32 (p13, p8, w12 + 1),
+	       p15 = svpsel_lane_b32 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p13_p8_p7_w12p3:
+**	psel	p13, p8, p7\.s\[w12, 3\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p8_p7_w12p3, svbool_t,
+	       p13 = svpsel_lane_b32 (p8, p7, w12 + 3),
+	       p13 = svpsel_lane_b32 (p8, p7, w12 + 3))
+
+/*
+** psel_lane_p0_p0_p0_w12p4:
+**	add	(w[0-9]+), w12, #?4
+**	psel	p0, p0, p0\.s\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p0_w12p4, svbool_t,
+	       p0 = svpsel_lane_b32 (p0, p0, w12 + 4),
+	       p0 = svpsel_lane_b32 (p0, p0, w12 + 4))
+
+/*
+** psel_lane_p15_p15_p15_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p15, p15, p15\.s\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p15_p15_w12m1, svbool_t,
+	       p15 = svpsel_lane_b32 (p15, p15, w12 - 1),
+	       p15 = svpsel_lane_b32 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b64.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b64.c
new file mode 100644
index 0000000000000000000000000000000000000000..a59032a57f61b7698cc2deff9e59064b652bf27e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b64.c
@@ -0,0 +1,80 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.d\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svbool_t,
+	       p0 = svpsel_lane_b64 (p2, p7, 0),
+	       p0 = svpsel_lane_b64 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p7_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p7, p8\.d\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p7_p8_w11, svbool_t,
+	       p2 = svpsel_lane_b64 (p7, p8, w11),
+	       p2 = svpsel_lane_b64 (p7, p8, w11))
+
+/*
+** psel_lane_p7_p8_p13_w12:
+**	psel	p7, p8, p13\.d\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p7_p8_p13_w12, svbool_t,
+	       p7 = svpsel_lane_b64 (p8, p13, w12),
+	       p7 = svpsel_lane_b64 (p8, p13, w12))
+
+/*
+** psel_lane_p8_p13_p15_w15:
+**	psel	p8, p13, p15\.d\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p8_p13_p15_w15, svbool_t,
+	       p8 = svpsel_lane_b64 (p13, p15, w15),
+	       p8 = svpsel_lane_b64 (p13, p15, w15))
+
+/*
+** psel_lane_p13_p15_p0_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p13, p15, p0\.d\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p15_p0_w16, svbool_t,
+	       p13 = svpsel_lane_b64 (p15, p0, w16),
+	       p13 = svpsel_lane_b64 (p15, p0, w16))
+
+/*
+** psel_lane_p15_p13_p8_w12p1:
+**	psel	p15, p13, p8\.d\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p13_p8_w12p1, svbool_t,
+	       p15 = svpsel_lane_b64 (p13, p8, w12 + 1),
+	       p15 = svpsel_lane_b64 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p0_p0_p0_w12p2:
+**	add	(w[0-9]+), w12, #?2
+**	psel	p0, p0, p0\.d\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p0_w12p2, svbool_t,
+	       p0 = svpsel_lane_b64 (p0, p0, w12 + 2),
+	       p0 = svpsel_lane_b64 (p0, p0, w12 + 2))
+
+/*
+** psel_lane_p15_p15_p15_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p15, p15, p15\.d\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p15_p15_w12m1, svbool_t,
+	       p15 = svpsel_lane_b64 (p15, p15, w12 - 1),
+	       p15 = svpsel_lane_b64 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b8.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b8.c
new file mode 100644
index 0000000000000000000000000000000000000000..0dea85c4f1f91385902fffa815b222b2969f1d3c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b8.c
@@ -0,0 +1,89 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.b\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svbool_t,
+	       p0 = svpsel_lane_b8 (p2, p7, 0),
+	       p0 = svpsel_lane_b8 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p7_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p7, p8\.b\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p7_p8_w11, svbool_t,
+	       p2 = svpsel_lane_b8 (p7, p8, w11),
+	       p2 = svpsel_lane_b8 (p7, p8, w11))
+
+/*
+** psel_lane_p7_p8_p13_w12:
+**	psel	p7, p8, p13\.b\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p7_p8_p13_w12, svbool_t,
+	       p7 = svpsel_lane_b8 (p8, p13, w12),
+	       p7 = svpsel_lane_b8 (p8, p13, w12))
+
+/*
+** psel_lane_p8_p13_p15_w15:
+**	psel	p8, p13, p15\.b\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p8_p13_p15_w15, svbool_t,
+	       p8 = svpsel_lane_b8 (p13, p15, w15),
+	       p8 = svpsel_lane_b8 (p13, p15, w15))
+
+/*
+** psel_lane_p13_p15_p0_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p13, p15, p0\.b\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p15_p0_w16, svbool_t,
+	       p13 = svpsel_lane_b8 (p15, p0, w16),
+	       p13 = svpsel_lane_b8 (p15, p0, w16))
+
+/*
+** psel_lane_p15_p13_p8_w12p1:
+**	psel	p15, p13, p8\.b\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p13_p8_w12p1, svbool_t,
+	       p15 = svpsel_lane_b8 (p13, p8, w12 + 1),
+	       p15 = svpsel_lane_b8 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p13_p8_p7_w12p15:
+**	psel	p13, p8, p7\.b\[w12, 15\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p8_p7_w12p15, svbool_t,
+	       p13 = svpsel_lane_b8 (p8, p7, w12 + 15),
+	       p13 = svpsel_lane_b8 (p8, p7, w12 + 15))
+
+/*
+** psel_lane_p0_p0_p0_w12p16:
+**	add	(w[0-9]+), w12, #?16
+**	psel	p0, p0, p0\.b\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p0_w12p16, svbool_t,
+	       p0 = svpsel_lane_b8 (p0, p0, w12 + 16),
+	       p0 = svpsel_lane_b8 (p0, p0, w12 + 16))
+
+/*
+** psel_lane_p15_p15_p15_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p15, p15, p15\.b\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p15_p15_p15_w12m1, svbool_t,
+	       p15 = svpsel_lane_b8 (p15, p15, w12 - 1),
+	       p15 = svpsel_lane_b8 (p15, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c16.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c16.c
new file mode 100644
index 0000000000000000000000000000000000000000..039c72b83c8dafb621686875eafed773dec87d33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c16.c
@@ -0,0 +1,89 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.h\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svcount_t,
+	       p0 = svpsel_lane_c16 (p2, p7, 0),
+	       p0 = svpsel_lane_c16 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p0_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p0, p8\.h\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p0_p8_w11, svcount_t,
+	       p2 = svpsel_lane_c16 (p0, p8, w11),
+	       p2 = svpsel_lane_c16 (p0, p8, w11))
+
+/*
+** psel_lane_p2_p13_p15_w12:
+**	psel	p2, p13, p15\.h\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p13_p15_w12, svcount_t,
+	       p2 = svpsel_lane_c16 (p13, p15, w12),
+	       p2 = svpsel_lane_c16 (p13, p15, w12))
+
+/*
+** psel_lane_p0_p13_p15_w15:
+**	psel	p0, p13, p15\.h\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p13_p15_w15, svcount_t,
+	       p0 = svpsel_lane_c16 (p13, p15, w15),
+	       p0 = svpsel_lane_c16 (p13, p15, w15))
+
+/*
+** psel_lane_p13_p0_p15_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p13, p0, p15\.h\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p0_p15_w16, svcount_t,
+	       p13 = svpsel_lane_c16 (p0, p15, w16),
+	       p13 = svpsel_lane_c16 (p0, p15, w16))
+
+/*
+** psel_lane_p2_p13_p8_w12p1:
+**	psel	p2, p13, p8\.h\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p13_p8_w12p1, svcount_t,
+	       p2 = svpsel_lane_c16 (p13, p8, w12 + 1),
+	       p2 = svpsel_lane_c16 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p13_p0_p7_w12p7:
+**	psel	p13, p0, p7\.h\[w12, 7\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p0_p7_w12p7, svcount_t,
+	       p13 = svpsel_lane_c16 (p0, p7, w12 + 7),
+	       p13 = svpsel_lane_c16 (p0, p7, w12 + 7))
+
+/*
+** psel_lane_p0_p0_p15_w12p8:
+**	add	(w[0-9]+), w12, #?8
+**	psel	p0, p0, p15\.h\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p15_w12p8, svcount_t,
+	       p0 = svpsel_lane_c16 (p0, p15, w12 + 8),
+	       p0 = svpsel_lane_c16 (p0, p15, w12 + 8))
+
+/*
+** psel_lane_p13_p13_p7_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p13, p13, p7\.h\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p13_p7_w12m1, svcount_t,
+	       p13 = svpsel_lane_c16 (p13, p7, w12 - 1),
+	       p13 = svpsel_lane_c16 (p13, p7, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c32.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c32.c
new file mode 100644
index 0000000000000000000000000000000000000000..eaf195d93d2f9173c98f50a1d1dfb52499a2323f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c32.c
@@ -0,0 +1,89 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.s\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svcount_t,
+	       p0 = svpsel_lane_c32 (p2, p7, 0),
+	       p0 = svpsel_lane_c32 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p13_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p13, p8\.s\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p13_p8_w11, svcount_t,
+	       p2 = svpsel_lane_c32 (p13, p8, w11),
+	       p2 = svpsel_lane_c32 (p13, p8, w11))
+
+/*
+** psel_lane_p0_p13_p15_w12:
+**	psel	p0, p13, p15\.s\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p13_p15_w12, svcount_t,
+	       p0 = svpsel_lane_c32 (p13, p15, w12),
+	       p0 = svpsel_lane_c32 (p13, p15, w12))
+
+/*
+** psel_lane_p2_p0_p15_w15:
+**	psel	p2, p0, p15\.s\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p0_p15_w15, svcount_t,
+	       p2 = svpsel_lane_c32 (p0, p15, w15),
+	       p2 = svpsel_lane_c32 (p0, p15, w15))
+
+/*
+** psel_lane_p13_p0_p7_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p13, p0, p7\.s\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p0_p7_w16, svcount_t,
+	       p13 = svpsel_lane_c32 (p0, p7, w16),
+	       p13 = svpsel_lane_c32 (p0, p7, w16))
+
+/*
+** psel_lane_p2_p13_p8_w12p1:
+**	psel	p2, p13, p8\.s\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p13_p8_w12p1, svcount_t,
+	       p2 = svpsel_lane_c32 (p13, p8, w12 + 1),
+	       p2 = svpsel_lane_c32 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p13_p0_p7_w12p3:
+**	psel	p13, p0, p7\.s\[w12, 3\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p0_p7_w12p3, svcount_t,
+	       p13 = svpsel_lane_c32 (p0, p7, w12 + 3),
+	       p13 = svpsel_lane_c32 (p0, p7, w12 + 3))
+
+/*
+** psel_lane_p0_p0_p7_w12p4:
+**	add	(w[0-9]+), w12, #?4
+**	psel	p0, p0, p7\.s\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p7_w12p4, svcount_t,
+	       p0 = svpsel_lane_c32 (p0, p7, w12 + 4),
+	       p0 = svpsel_lane_c32 (p0, p7, w12 + 4))
+
+/*
+** psel_lane_p13_p13_p15_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p13, p13, p15\.s\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p13_p15_w12m1, svcount_t,
+	       p13 = svpsel_lane_c32 (p13, p15, w12 - 1),
+	       p13 = svpsel_lane_c32 (p13, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c64.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c64.c
new file mode 100644
index 0000000000000000000000000000000000000000..70cfeca4fc82c88f4358e2d08e24b84dda8b6dba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c64.c
@@ -0,0 +1,80 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.d\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svcount_t,
+	       p0 = svpsel_lane_c64 (p2, p7, 0),
+	       p0 = svpsel_lane_c64 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p13_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p13, p8\.d\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p13_p8_w11, svcount_t,
+	       p2 = svpsel_lane_c64 (p13, p8, w11),
+	       p2 = svpsel_lane_c64 (p13, p8, w11))
+
+/*
+** psel_lane_p2_p0_p15_w12:
+**	psel	p2, p0, p15\.d\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p0_p15_w12, svcount_t,
+	       p2 = svpsel_lane_c64 (p0, p15, w12),
+	       p2 = svpsel_lane_c64 (p0, p15, w12))
+
+/*
+** psel_lane_p0_p13_p15_w15:
+**	psel	p0, p13, p15\.d\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p13_p15_w15, svcount_t,
+	       p0 = svpsel_lane_c64 (p13, p15, w15),
+	       p0 = svpsel_lane_c64 (p13, p15, w15))
+
+/*
+** psel_lane_p13_p0_p15_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p13, p0, p15\.d\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p0_p15_w16, svcount_t,
+	       p13 = svpsel_lane_c64 (p0, p15, w16),
+	       p13 = svpsel_lane_c64 (p0, p15, w16))
+
+/*
+** psel_lane_p2_p13_p8_w12p1:
+**	psel	p2, p13, p8\.d\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p13_p8_w12p1, svcount_t,
+	       p2 = svpsel_lane_c64 (p13, p8, w12 + 1),
+	       p2 = svpsel_lane_c64 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p0_p0_p8_w12p2:
+**	add	(w[0-9]+), w12, #?2
+**	psel	p0, p0, p8\.d\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p8_w12p2, svcount_t,
+	       p0 = svpsel_lane_c64 (p0, p8, w12 + 2),
+	       p0 = svpsel_lane_c64 (p0, p8, w12 + 2))
+
+/*
+** psel_lane_p13_p13_p15_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p13, p13, p15\.d\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p13_p15_w12m1, svcount_t,
+	       p13 = svpsel_lane_c64 (p13, p15, w12 - 1),
+	       p13 = svpsel_lane_c64 (p13, p15, w12 - 1))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c8.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c8.c
new file mode 100644
index 0000000000000000000000000000000000000000..b017962629f1c182d395209088835a0d78fd209d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c8.c
@@ -0,0 +1,89 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** psel_lane_p0_p2_p7_0:
+**	mov	[wx](1[2-5]), #?0
+**	psel	p0, p2, p7\.b\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p2_p7_0, svcount_t,
+	       p0 = svpsel_lane_c8 (p2, p7, 0),
+	       p0 = svpsel_lane_c8 (p2, p7, 0))
+
+/*
+** psel_lane_p2_p0_p8_w11:
+**	mov	[wx](1[2-5]), [wx]11
+**	psel	p2, p0, p8\.b\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p0_p8_w11, svcount_t,
+	       p2 = svpsel_lane_c8 (p0, p8, w11),
+	       p2 = svpsel_lane_c8 (p0, p8, w11))
+
+/*
+** psel_lane_p0_p13_p15_w12:
+**	psel	p0, p13, p15\.b\[w12, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p13_p15_w12, svcount_t,
+	       p0 = svpsel_lane_c8 (p13, p15, w12),
+	       p0 = svpsel_lane_c8 (p13, p15, w12))
+
+/*
+** psel_lane_p13_p0_p8_w15:
+**	psel	p13, p0, p8\.b\[w15, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p0_p8_w15, svcount_t,
+	       p13 = svpsel_lane_c8 (p0, p8, w15),
+	       p13 = svpsel_lane_c8 (p0, p8, w15))
+
+/*
+** psel_lane_p2_p13_p7_w16:
+**	mov	[wx](1[2-5]), [wx]16
+**	psel	p2, p13, p7\.b\[w\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p2_p13_p7_w16, svcount_t,
+	       p2 = svpsel_lane_c8 (p13, p7, w16),
+	       p2 = svpsel_lane_c8 (p13, p7, w16))
+
+/*
+** psel_lane_p0_p13_p8_w12p1:
+**	psel	p0, p13, p8\.b\[w12, 1\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p13_p8_w12p1, svcount_t,
+	       p0 = svpsel_lane_c8 (p13, p8, w12 + 1),
+	       p0 = svpsel_lane_c8 (p13, p8, w12 + 1))
+
+/*
+** psel_lane_p13_p2_p7_w12p15:
+**	psel	p13, p2, p7\.b\[w12, 15\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p2_p7_w12p15, svcount_t,
+	       p13 = svpsel_lane_c8 (p2, p7, w12 + 15),
+	       p13 = svpsel_lane_c8 (p2, p7, w12 + 15))
+
+/*
+** psel_lane_p0_p0_p15_w12p16:
+**	add	(w[0-9]+), w12, #?16
+**	psel	p0, p0, p15\.b\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p0_p0_p15_w12p16, svcount_t,
+	       p0 = svpsel_lane_c8 (p0, p15, w12 + 16),
+	       p0 = svpsel_lane_c8 (p0, p15, w12 + 16))
+
+/*
+** psel_lane_p13_p13_p15_w12m1:
+**	sub	(w[0-9]+), w12, #?1
+**	psel	p13, p13, p15\.b\[\1, 0\]
+**	ret
+*/
+TEST_SELECT_P (psel_lane_p13_p13_p15_w12m1, svcount_t,
+	       p13 = svpsel_lane_c8 (p13, p15, w12 - 1),
+	       p13 = svpsel_lane_c8 (p13, p15, w12 - 1))



