diff mbox series

[2/3] aarch64: Make PSEL dependent on SME rather than SME2

Message ID 20241106102641.511909-3-richard.sandiford@arm.com
State New
Headers show
Series aarch64: Fix various issues with the SME support | expand

Commit Message

Richard Sandiford Nov. 6, 2024, 10:26 a.m. UTC
The svpsel_lane intrinsics were wrongly classified as SME2+ only,
rather than as base SME intrinsics.  They should always be available
in streaming mode.

gcc/
	* config/aarch64/aarch64-sve2.md (@aarch64_sve_psel<BHSD_BITS>)
	(*aarch64_sve_psel<BHSD_BITS>_plus): Require TARGET_STREAMING
	rather than TARGET_STREAMING_SME2.

gcc/testsuite/
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_b16.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_b16.c: ...here.
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_b32.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_b32.c: ...here.
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_b64.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_b64.c: ...here.
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_b8.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_b8.c: ...here.
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_c16.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_c16.c: ...here.
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_c32.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_c32.c: ...here.
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_c64.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_c64.c: ...here.
	* gcc.target/aarch64/sme2/acle-asm/psel_lane_c8.c: Move to...
	* gcc.target/aarch64/sme/acle-asm/psel_lane_c8.c: ...here.
---
 gcc/config/aarch64/aarch64-sve2.md                            | 4 ++--
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b16.c | 2 +-
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b32.c | 2 +-
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b64.c | 2 +-
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b8.c  | 2 +-
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c16.c | 2 +-
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c32.c | 2 +-
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c64.c | 2 +-
 .../gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c8.c  | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b16.c (98%)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b32.c (98%)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b64.c (98%)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_b8.c (98%)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c16.c (98%)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c32.c (98%)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c64.c (98%)
 rename gcc/testsuite/gcc.target/aarch64/{sme2 => sme}/acle-asm/psel_lane_c8.c (98%)
diff mbox series

Patch

diff --git a/gcc/config/aarch64/aarch64-sve2.md b/gcc/config/aarch64/aarch64-sve2.md
index 08f83fc7ca0..ac27124fb74 100644
--- a/gcc/config/aarch64/aarch64-sve2.md
+++ b/gcc/config/aarch64/aarch64-sve2.md
@@ -418,7 +418,7 @@  (define_insn "@aarch64_sve_psel<BHSD_BITS>"
 	   (match_operand:SI 3 "register_operand" "Ucj")
 	   (const_int BHSD_BITS)]
 	  UNSPEC_PSEL))]
-  "TARGET_STREAMING_SME2"
+  "TARGET_STREAMING"
   "psel\t%0, %1, %2.<bits_etype>[%w3, 0]"
 )
 
@@ -432,7 +432,7 @@  (define_insn "*aarch64_sve_psel<BHSD_BITS>_plus"
 	     (match_operand:SI 4 "const_int_operand"))
 	   (const_int BHSD_BITS)]
 	  UNSPEC_PSEL))]
-  "TARGET_STREAMING_SME2
+  "TARGET_STREAMING
    && UINTVAL (operands[4]) < 128 / <BHSD_BITS>"
   "psel\t%0, %1, %2.<bits_etype>[%w3, %4]"
 )
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b16.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b16.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b16.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b16.c
index 704e9e375f5..45dda808d2a 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b16.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b16.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0:
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b32.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b32.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b32.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b32.c
index 7d9c7a129ea..d3d1b7b42ca 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b32.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b32.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0:
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b64.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b64.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b64.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b64.c
index a59032a57f6..8c1e014db65 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b64.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b64.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0:
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b8.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b8.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b8.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b8.c
index 0dea85c4f1f..aadfd3515ad 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_b8.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_b8.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0:
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c16.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c16.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c16.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c16.c
index 039c72b83c8..68c875eccf5 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c16.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c16.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0:
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c32.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c32.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c32.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c32.c
index eaf195d93d2..af044fb34ec 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c32.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c32.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0:
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c64.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c64.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c64.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c64.c
index 70cfeca4fc8..911336900b7 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c64.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c64.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0:
diff --git a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c8.c b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c8.c
similarity index 98%
rename from gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c8.c
rename to gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c8.c
index b017962629f..31f95408a67 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme2/acle-asm/psel_lane_c8.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/acle-asm/psel_lane_c8.c
@@ -1,6 +1,6 @@ 
 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
 
-#include "test_sme2_acle.h"
+#include "test_sme_acle.h"
 
 /*
 ** psel_lane_p0_p2_p7_0: