diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
index dc591551682..146a5459930 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
@@ -221,7 +221,7 @@ public:
   }
 };
 
-class svpext_impl : public function_base
+class svpext_lane_impl : public function_base
 {
 public:
   rtx
@@ -619,7 +619,7 @@ FUNCTION (svmullt_lane, unspec_based_lane_function, (UNSPEC_SMULLT,
 						     UNSPEC_UMULLT, -1))
 FUNCTION (svnbsl, CODE_FOR_MODE0 (aarch64_sve2_nbsl),)
 FUNCTION (svnmatch, svmatch_svnmatch_impl, (UNSPEC_NMATCH))
-FUNCTION (svpext, svpext_impl,)
+FUNCTION (svpext_lane, svpext_lane_impl,)
 FUNCTION (svpmul, CODE_FOR_MODE0 (aarch64_sve2_pmul),)
 FUNCTION (svpmullb, unspec_based_function, (-1, UNSPEC_PMULLB, -1))
 FUNCTION (svpmullb_pair, unspec_based_function, (-1, UNSPEC_PMULLB_PAIR, -1))
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.def b/gcc/config/aarch64/aarch64-sve-builtins-sve2.def
index 4366925a971..4543402f836 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.def
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.def
@@ -263,7 +263,7 @@ DEF_SVE_FUNCTION_GS (svmax, binary_opt_single_n, all_arith, x24, none)
 DEF_SVE_FUNCTION_GS (svmaxnm, binary_opt_single_n, all_float, x24, none)
 DEF_SVE_FUNCTION_GS (svmin, binary_opt_single_n, all_arith, x24, none)
 DEF_SVE_FUNCTION_GS (svminnm, binary_opt_single_n, all_float, x24, none)
-DEF_SVE_FUNCTION_GS (svpext, extract_pred, all_count, x12, none)
+DEF_SVE_FUNCTION_GS (svpext_lane, extract_pred, all_count, x12, none)
 DEF_SVE_FUNCTION (svptrue, inherent, all_count, none)
 DEF_SVE_FUNCTION_GS (svqcvt, unary_convertxn, qcvt_x2, x2, none)
 DEF_SVE_FUNCTION_GS (svqcvt, unary_convertxn, qcvt_x4, x4, none)
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.h b/gcc/config/aarch64/aarch64-sve-builtins-sve2.h
index a612ace9415..2ac6edeb8db 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.h
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.h
@@ -100,7 +100,7 @@ namespace aarch64_sve
     extern const function_base *const svmullt_lane;
     extern const function_base *const svnbsl;
     extern const function_base *const svnmatch;
-    extern const function_base *const svpext;
+    extern const function_base *const svpext_lane;
     extern const function_base *const svpmul;
     extern const function_base *const svpmullb;
     extern const function_base *const svpmullb_pair;
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c16.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c16.c
deleted file mode 100644
index b03a8aed994..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c16.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	p2\.h, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svbool_t,
-		 p2 = svpext_c16 (pn0, 0),
-		 p2 = svpext_c16 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	p5\.h, pn\1\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svbool_t,
-		 p5 = svpext_c16 (pn7, 1),
-		 p5 = svpext_c16 (pn7, 1))
-
-/*
-** pext_p9_pn8_2:
-**	pext	p9\.h, pn8\[2\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_2, svbool_t,
-		 p9 = svpext_c16 (pn8, 2),
-		 p9 = svpext_c16 (pn8, 2))
-
-/*
-** pext_p12_pn11_3:
-**	pext	p12\.h, pn11\[3\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_3, svbool_t,
-		 p12 = svpext_c16 (pn11, 3),
-		 p12 = svpext_c16 (pn11, 3))
-
-/*
-** pext_p2_pn15_0:
-**	pext	p2\.h, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svbool_t,
-		 p2 = svpext_c16 (pn15, 0),
-		 p2 = svpext_c16 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c16_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c16_x2.c
deleted file mode 100644
index c07d82038b1..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c16_x2.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	{p2\.h, p3\.h}, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svboolx2_t,
-		 p2 = svpext_c16_x2 (pn0, 0),
-		 p2 = svpext_c16_x2 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	{[^}]+}, pn\1\[1\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svboolx2_t,
-		 p5 = svpext_c16_x2 (pn7, 1),
-		 p5 = svpext_c16_x2 (pn7, 1))
-
-/*
-** pext_p9_pn8_0:
-**	pext	{[^}]+}, pn8\[0\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_0, svboolx2_t,
-		 p9 = svpext_c16_x2 (pn8, 0),
-		 p9 = svpext_c16_x2 (pn8, 0))
-
-/*
-** pext_p12_pn11_1:
-**	pext	{p12\.h, p13\.h}, pn11\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_1, svboolx2_t,
-		 p12 = svpext_c16_x2 (pn11, 1),
-		 p12 = svpext_c16_x2 (pn11, 1))
-
-/*
-** pext_p2_pn15_0:
-**	pext	{p2\.h, p3\.h}, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svboolx2_t,
-		 p2 = svpext_c16_x2 (pn15, 0),
-		 p2 = svpext_c16_x2 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c32.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c32.c
deleted file mode 100644
index 2a63942d8e8..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c32.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	p2\.s, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svbool_t,
-		 p2 = svpext_c32 (pn0, 0),
-		 p2 = svpext_c32 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	p5\.s, pn\1\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svbool_t,
-		 p5 = svpext_c32 (pn7, 1),
-		 p5 = svpext_c32 (pn7, 1))
-
-/*
-** pext_p9_pn8_2:
-**	pext	p9\.s, pn8\[2\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_2, svbool_t,
-		 p9 = svpext_c32 (pn8, 2),
-		 p9 = svpext_c32 (pn8, 2))
-
-/*
-** pext_p12_pn11_3:
-**	pext	p12\.s, pn11\[3\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_3, svbool_t,
-		 p12 = svpext_c32 (pn11, 3),
-		 p12 = svpext_c32 (pn11, 3))
-
-/*
-** pext_p2_pn15_0:
-**	pext	p2\.s, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svbool_t,
-		 p2 = svpext_c32 (pn15, 0),
-		 p2 = svpext_c32 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c32_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c32_x2.c
deleted file mode 100644
index 1629b440fab..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c32_x2.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	{p2\.s, p3\.s}, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svboolx2_t,
-		 p2 = svpext_c32_x2 (pn0, 0),
-		 p2 = svpext_c32_x2 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	{[^}]+}, pn\1\[1\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svboolx2_t,
-		 p5 = svpext_c32_x2 (pn7, 1),
-		 p5 = svpext_c32_x2 (pn7, 1))
-
-/*
-** pext_p9_pn8_0:
-**	pext	{[^}]+}, pn8\[0\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_0, svboolx2_t,
-		 p9 = svpext_c32_x2 (pn8, 0),
-		 p9 = svpext_c32_x2 (pn8, 0))
-
-/*
-** pext_p12_pn11_1:
-**	pext	{p12\.s, p13\.s}, pn11\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_1, svboolx2_t,
-		 p12 = svpext_c32_x2 (pn11, 1),
-		 p12 = svpext_c32_x2 (pn11, 1))
-
-/*
-** pext_p2_pn15_0:
-**	pext	{p2\.s, p3\.s}, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svboolx2_t,
-		 p2 = svpext_c32_x2 (pn15, 0),
-		 p2 = svpext_c32_x2 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c64.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c64.c
deleted file mode 100644
index 8c93d7b6f1f..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c64.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	p2\.d, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svbool_t,
-		 p2 = svpext_c64 (pn0, 0),
-		 p2 = svpext_c64 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	p5\.d, pn\1\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svbool_t,
-		 p5 = svpext_c64 (pn7, 1),
-		 p5 = svpext_c64 (pn7, 1))
-
-/*
-** pext_p9_pn8_2:
-**	pext	p9\.d, pn8\[2\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_2, svbool_t,
-		 p9 = svpext_c64 (pn8, 2),
-		 p9 = svpext_c64 (pn8, 2))
-
-/*
-** pext_p12_pn11_3:
-**	pext	p12\.d, pn11\[3\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_3, svbool_t,
-		 p12 = svpext_c64 (pn11, 3),
-		 p12 = svpext_c64 (pn11, 3))
-
-/*
-** pext_p2_pn15_0:
-**	pext	p2\.d, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svbool_t,
-		 p2 = svpext_c64 (pn15, 0),
-		 p2 = svpext_c64 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c64_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c64_x2.c
deleted file mode 100644
index ab12c8a9003..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c64_x2.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	{p2\.d, p3\.d}, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svboolx2_t,
-		 p2 = svpext_c64_x2 (pn0, 0),
-		 p2 = svpext_c64_x2 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	{[^}]+}, pn\1\[1\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svboolx2_t,
-		 p5 = svpext_c64_x2 (pn7, 1),
-		 p5 = svpext_c64_x2 (pn7, 1))
-
-/*
-** pext_p9_pn8_0:
-**	pext	{[^}]+}, pn8\[0\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_0, svboolx2_t,
-		 p9 = svpext_c64_x2 (pn8, 0),
-		 p9 = svpext_c64_x2 (pn8, 0))
-
-/*
-** pext_p12_pn11_1:
-**	pext	{p12\.d, p13\.d}, pn11\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_1, svboolx2_t,
-		 p12 = svpext_c64_x2 (pn11, 1),
-		 p12 = svpext_c64_x2 (pn11, 1))
-
-/*
-** pext_p2_pn15_0:
-**	pext	{p2\.d, p3\.d}, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svboolx2_t,
-		 p2 = svpext_c64_x2 (pn15, 0),
-		 p2 = svpext_c64_x2 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c8.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c8.c
deleted file mode 100644
index 8f882ce5a14..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c8.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	p2\.b, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svbool_t,
-		 p2 = svpext_c8 (pn0, 0),
-		 p2 = svpext_c8 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	p5\.b, pn\1\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svbool_t,
-		 p5 = svpext_c8 (pn7, 1),
-		 p5 = svpext_c8 (pn7, 1))
-
-/*
-** pext_p9_pn8_2:
-**	pext	p9\.b, pn8\[2\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_2, svbool_t,
-		 p9 = svpext_c8 (pn8, 2),
-		 p9 = svpext_c8 (pn8, 2))
-
-/*
-** pext_p12_pn11_3:
-**	pext	p12\.b, pn11\[3\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_3, svbool_t,
-		 p12 = svpext_c8 (pn11, 3),
-		 p12 = svpext_c8 (pn11, 3))
-
-/*
-** pext_p2_pn15_0:
-**	pext	p2\.b, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svbool_t,
-		 p2 = svpext_c8 (pn15, 0),
-		 p2 = svpext_c8 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c8_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c8_x2.c
deleted file mode 100644
index 814e36df094..00000000000
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_c8_x2.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
-
-#include "test_sme2_acle.h"
-
-/*
-** pext_p2_pn0_0:
-**	mov	p([0-9]+)\.b, p0\.b
-**	pext	{p2\.b, p3\.b}, pn\1\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn0_0, svboolx2_t,
-		 p2 = svpext_c8_x2 (pn0, 0),
-		 p2 = svpext_c8_x2 (pn0, 0))
-
-/*
-** pext_p5_pn7_1:
-**	mov	p([0-9]+)\.b, p7\.b
-**	pext	{[^}]+}, pn\1\[1\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p5_pn7_1, svboolx2_t,
-		 p5 = svpext_c8_x2 (pn7, 1),
-		 p5 = svpext_c8_x2 (pn7, 1))
-
-/*
-** pext_p9_pn8_0:
-**	pext	{[^}]+}, pn8\[0\]
-**	mov	[^\n]+
-**	mov	[^\n]+
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p9_pn8_0, svboolx2_t,
-		 p9 = svpext_c8_x2 (pn8, 0),
-		 p9 = svpext_c8_x2 (pn8, 0))
-
-/*
-** pext_p12_pn11_1:
-**	pext	{p12\.b, p13\.b}, pn11\[1\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p12_pn11_1, svboolx2_t,
-		 p12 = svpext_c8_x2 (pn11, 1),
-		 p12 = svpext_c8_x2 (pn11, 1))
-
-/*
-** pext_p2_pn15_0:
-**	pext	{p2\.b, p3\.b}, pn15\[0\]
-**	ret
-*/
-TEST_EXTRACT_PN (pext_p2_pn15_0, svboolx2_t,
-		 p2 = svpext_c8_x2 (pn15, 0),
-		 p2 = svpext_c8_x2 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c16.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c16.c
new file mode 100644
index 00000000000..d06598f71ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c16.c
@@ -0,0 +1,50 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	p2\.h, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svbool_t,
+		 p2 = svpext_lane_c16 (pn0, 0),
+		 p2 = svpext_lane_c16 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	p5\.h, pn\1\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svbool_t,
+		 p5 = svpext_lane_c16 (pn7, 1),
+		 p5 = svpext_lane_c16 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_2:
+**	pext	p9\.h, pn8\[2\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_2, svbool_t,
+		 p9 = svpext_lane_c16 (pn8, 2),
+		 p9 = svpext_lane_c16 (pn8, 2))
+
+/*
+** pext_lane_p12_pn11_3:
+**	pext	p12\.h, pn11\[3\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_3, svbool_t,
+		 p12 = svpext_lane_c16 (pn11, 3),
+		 p12 = svpext_lane_c16 (pn11, 3))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	p2\.h, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svbool_t,
+		 p2 = svpext_lane_c16 (pn15, 0),
+		 p2 = svpext_lane_c16 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c16_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c16_x2.c
new file mode 100644
index 00000000000..eb2621cda9a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c16_x2.c
@@ -0,0 +1,54 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	{p2\.h, p3\.h}, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svboolx2_t,
+		 p2 = svpext_lane_c16_x2 (pn0, 0),
+		 p2 = svpext_lane_c16_x2 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	{[^}]+}, pn\1\[1\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svboolx2_t,
+		 p5 = svpext_lane_c16_x2 (pn7, 1),
+		 p5 = svpext_lane_c16_x2 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_0:
+**	pext	{[^}]+}, pn8\[0\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_0, svboolx2_t,
+		 p9 = svpext_lane_c16_x2 (pn8, 0),
+		 p9 = svpext_lane_c16_x2 (pn8, 0))
+
+/*
+** pext_lane_p12_pn11_1:
+**	pext	{p12\.h, p13\.h}, pn11\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_1, svboolx2_t,
+		 p12 = svpext_lane_c16_x2 (pn11, 1),
+		 p12 = svpext_lane_c16_x2 (pn11, 1))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	{p2\.h, p3\.h}, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svboolx2_t,
+		 p2 = svpext_lane_c16_x2 (pn15, 0),
+		 p2 = svpext_lane_c16_x2 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c32.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c32.c
new file mode 100644
index 00000000000..870e671852a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c32.c
@@ -0,0 +1,50 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	p2\.s, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svbool_t,
+		 p2 = svpext_lane_c32 (pn0, 0),
+		 p2 = svpext_lane_c32 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	p5\.s, pn\1\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svbool_t,
+		 p5 = svpext_lane_c32 (pn7, 1),
+		 p5 = svpext_lane_c32 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_2:
+**	pext	p9\.s, pn8\[2\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_2, svbool_t,
+		 p9 = svpext_lane_c32 (pn8, 2),
+		 p9 = svpext_lane_c32 (pn8, 2))
+
+/*
+** pext_lane_p12_pn11_3:
+**	pext	p12\.s, pn11\[3\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_3, svbool_t,
+		 p12 = svpext_lane_c32 (pn11, 3),
+		 p12 = svpext_lane_c32 (pn11, 3))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	p2\.s, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svbool_t,
+		 p2 = svpext_lane_c32 (pn15, 0),
+		 p2 = svpext_lane_c32 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c32_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c32_x2.c
new file mode 100644
index 00000000000..1ed586de1ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c32_x2.c
@@ -0,0 +1,54 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	{p2\.s, p3\.s}, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svboolx2_t,
+		 p2 = svpext_lane_c32_x2 (pn0, 0),
+		 p2 = svpext_lane_c32_x2 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	{[^}]+}, pn\1\[1\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svboolx2_t,
+		 p5 = svpext_lane_c32_x2 (pn7, 1),
+		 p5 = svpext_lane_c32_x2 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_0:
+**	pext	{[^}]+}, pn8\[0\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_0, svboolx2_t,
+		 p9 = svpext_lane_c32_x2 (pn8, 0),
+		 p9 = svpext_lane_c32_x2 (pn8, 0))
+
+/*
+** pext_lane_p12_pn11_1:
+**	pext	{p12\.s, p13\.s}, pn11\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_1, svboolx2_t,
+		 p12 = svpext_lane_c32_x2 (pn11, 1),
+		 p12 = svpext_lane_c32_x2 (pn11, 1))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	{p2\.s, p3\.s}, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svboolx2_t,
+		 p2 = svpext_lane_c32_x2 (pn15, 0),
+		 p2 = svpext_lane_c32_x2 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c64.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c64.c
new file mode 100644
index 00000000000..a3a0b299e88
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c64.c
@@ -0,0 +1,50 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	p2\.d, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svbool_t,
+		 p2 = svpext_lane_c64 (pn0, 0),
+		 p2 = svpext_lane_c64 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	p5\.d, pn\1\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svbool_t,
+		 p5 = svpext_lane_c64 (pn7, 1),
+		 p5 = svpext_lane_c64 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_2:
+**	pext	p9\.d, pn8\[2\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_2, svbool_t,
+		 p9 = svpext_lane_c64 (pn8, 2),
+		 p9 = svpext_lane_c64 (pn8, 2))
+
+/*
+** pext_lane_p12_pn11_3:
+**	pext	p12\.d, pn11\[3\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_3, svbool_t,
+		 p12 = svpext_lane_c64 (pn11, 3),
+		 p12 = svpext_lane_c64 (pn11, 3))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	p2\.d, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svbool_t,
+		 p2 = svpext_lane_c64 (pn15, 0),
+		 p2 = svpext_lane_c64 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c64_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c64_x2.c
new file mode 100644
index 00000000000..3678912f5a0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c64_x2.c
@@ -0,0 +1,54 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	{p2\.d, p3\.d}, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svboolx2_t,
+		 p2 = svpext_lane_c64_x2 (pn0, 0),
+		 p2 = svpext_lane_c64_x2 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	{[^}]+}, pn\1\[1\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svboolx2_t,
+		 p5 = svpext_lane_c64_x2 (pn7, 1),
+		 p5 = svpext_lane_c64_x2 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_0:
+**	pext	{[^}]+}, pn8\[0\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_0, svboolx2_t,
+		 p9 = svpext_lane_c64_x2 (pn8, 0),
+		 p9 = svpext_lane_c64_x2 (pn8, 0))
+
+/*
+** pext_lane_p12_pn11_1:
+**	pext	{p12\.d, p13\.d}, pn11\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_1, svboolx2_t,
+		 p12 = svpext_lane_c64_x2 (pn11, 1),
+		 p12 = svpext_lane_c64_x2 (pn11, 1))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	{p2\.d, p3\.d}, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svboolx2_t,
+		 p2 = svpext_lane_c64_x2 (pn15, 0),
+		 p2 = svpext_lane_c64_x2 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c8.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c8.c
new file mode 100644
index 00000000000..ca1767c7655
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c8.c
@@ -0,0 +1,50 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	p2\.b, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svbool_t,
+		 p2 = svpext_lane_c8 (pn0, 0),
+		 p2 = svpext_lane_c8 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	p5\.b, pn\1\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svbool_t,
+		 p5 = svpext_lane_c8 (pn7, 1),
+		 p5 = svpext_lane_c8 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_2:
+**	pext	p9\.b, pn8\[2\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_2, svbool_t,
+		 p9 = svpext_lane_c8 (pn8, 2),
+		 p9 = svpext_lane_c8 (pn8, 2))
+
+/*
+** pext_lane_p12_pn11_3:
+**	pext	p12\.b, pn11\[3\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_3, svbool_t,
+		 p12 = svpext_lane_c8 (pn11, 3),
+		 p12 = svpext_lane_c8 (pn11, 3))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	p2\.b, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svbool_t,
+		 p2 = svpext_lane_c8 (pn15, 0),
+		 p2 = svpext_lane_c8 (pn15, 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c8_x2.c b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c8_x2.c
new file mode 100644
index 00000000000..d2ef31e5655
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/pext_lane_c8_x2.c
@@ -0,0 +1,54 @@
+/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
+
+#include "test_sme2_acle.h"
+
+/*
+** pext_lane_p2_pn0_0:
+**	mov	p([0-9]+)\.b, p0\.b
+**	pext	{p2\.b, p3\.b}, pn\1\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn0_0, svboolx2_t,
+		 p2 = svpext_lane_c8_x2 (pn0, 0),
+		 p2 = svpext_lane_c8_x2 (pn0, 0))
+
+/*
+** pext_lane_p5_pn7_1:
+**	mov	p([0-9]+)\.b, p7\.b
+**	pext	{[^}]+}, pn\1\[1\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p5_pn7_1, svboolx2_t,
+		 p5 = svpext_lane_c8_x2 (pn7, 1),
+		 p5 = svpext_lane_c8_x2 (pn7, 1))
+
+/*
+** pext_lane_p9_pn8_0:
+**	pext	{[^}]+}, pn8\[0\]
+**	mov	[^\n]+
+**	mov	[^\n]+
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p9_pn8_0, svboolx2_t,
+		 p9 = svpext_lane_c8_x2 (pn8, 0),
+		 p9 = svpext_lane_c8_x2 (pn8, 0))
+
+/*
+** pext_lane_p12_pn11_1:
+**	pext	{p12\.b, p13\.b}, pn11\[1\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p12_pn11_1, svboolx2_t,
+		 p12 = svpext_lane_c8_x2 (pn11, 1),
+		 p12 = svpext_lane_c8_x2 (pn11, 1))
+
+/*
+** pext_lane_p2_pn15_0:
+**	pext	{p2\.b, p3\.b}, pn15\[0\]
+**	ret
+*/
+TEST_EXTRACT_PN (pext_lane_p2_pn15_0, svboolx2_t,
+		 p2 = svpext_lane_c8_x2 (pn15, 0),
+		 p2 = svpext_lane_c8_x2 (pn15, 0))
