[gcc(refs/users/aoliva/heads/testme)] testsuite: vect: ppc: no SLP of unaligned stores on altivec
Alexandre Oliva
aoliva@gcc.gnu.org
Tue Mar 10 07:53:53 GMT 2026
https://gcc.gnu.org/g:84d04aa2f23257d3a963245e4c75733fec90e034
commit 84d04aa2f23257d3a963245e4c75733fec90e034
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Mar 10 04:18:45 2026 -0300
testsuite: vect: ppc: no SLP of unaligned stores on altivec
Altivec can't handle unaligned stores, which these two tests rely on,
for storing in arrays that aren't known to be sufficiently aligned for
the use of vector stores.
Check for support for realigned or misaligned stores as a precondition
for the expected SLP vectorization. This relies on an effective
target added by another patch in this series.
for gcc/testsuite/ChangeLog
* gcc.dg/vect/bb-slp-conditional_store_1.c: Don't require SLP
vectorization if stores can't be realigned or misaligned.
* gcc.dg/vect/bb-slp-layout-20.c: Likewise.
Diff:
---
gcc/testsuite/gcc.dg/vect/bb-slp-conditional_store_1.c | 3 ++-
gcc/testsuite/gcc.dg/vect/bb-slp-layout-20.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-conditional_store_1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-conditional_store_1.c
index 650a3bfbfb1d..b1b198fd23f6 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-conditional_store_1.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-conditional_store_1.c
@@ -12,4 +12,5 @@ void foo3 (float *restrict a, int *restrict c)
c[i] = a[i] > 1.0;
}
-/* { dg-final { scan-tree-dump "vectorized using SLP" "slp1" } } */
+/* Altivec cannot slp-vectorize the stores that aren't known to be vector-aligned. */
+/* { dg-final { scan-tree-dump "vectorized using SLP" "slp1" { target { ! { vect_no_store_align && { ! vect_hw_misalign } } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-layout-20.c b/gcc/testsuite/gcc.dg/vect/bb-slp-layout-20.c
index ed7816b3f7b8..ba8577fd4f98 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-layout-20.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-layout-20.c
@@ -30,4 +30,5 @@ void f()
e[3] = b3;
}
-/* { dg-final { scan-tree-dump-times "add new stmt: \[^\\n\\r\]* = VEC_PERM_EXPR" 3 "slp1" { target { vect_int_mult && vect_perm } } } } */
+/* Altivec cannot slp-vectorize the stores that aren't known to be vector-aligned. */
+/* { dg-final { scan-tree-dump-times "add new stmt: \[^\\n\\r\]* = VEC_PERM_EXPR" 3 "slp1" { target { { vect_int_mult && vect_perm } && { ! { vect_no_store_align && { ! vect_hw_misalign } } } } } } } */
More information about the Gcc-cvs
mailing list