We don't yet support SLP inductions for variable-length vectors,
so this patch XFAILs some associated tests.

(Inductions aren't inherently difficult to support.  It just hasn't
been done yet.)

Tested on aarch64-linux-gnu (with and without SVE), arm-linux-gnueabihf
and x86_64-linux-gnu.  Pushed as obvious.

Richard


gcc/testsuite/
        * gcc.dg/vect/pr97678.c: XFAIL test for SLP vectorization
        for variable-length vectors.
        * gcc.dg/vect/pr97835.c: Likewise.
        * gcc.dg/vect/slp-49.c: Likewise.
        * gcc.dg/vect/vect-outer-slp-1.c: Likewise.
        * gcc.dg/vect/vect-outer-slp-2.c: Likewise.
        * gcc.dg/vect/vect-outer-slp-3.c: Likewise.
---
 gcc/testsuite/gcc.dg/vect/pr97678.c          | 3 ++-
 gcc/testsuite/gcc.dg/vect/pr97835.c          | 3 ++-
 gcc/testsuite/gcc.dg/vect/slp-49.c           | 3 ++-
 gcc/testsuite/gcc.dg/vect/vect-outer-slp-1.c | 3 ++-
 gcc/testsuite/gcc.dg/vect/vect-outer-slp-2.c | 3 ++-
 gcc/testsuite/gcc.dg/vect/vect-outer-slp-3.c | 3 ++-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/pr97678.c 
b/gcc/testsuite/gcc.dg/vect/pr97678.c
index ebe4a35bb3f..d9ffb7a169b 100644
--- a/gcc/testsuite/gcc.dg/vect/pr97678.c
+++ b/gcc/testsuite/gcc.dg/vect/pr97678.c
@@ -26,4 +26,5 @@ main ()
 }
 
 /* The init loop should be vectorized with SLP.  */
-/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
+/* We don't yet support SLP inductions for variable length vectors.  */
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { xfail 
vect_variable_length } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr97835.c 
b/gcc/testsuite/gcc.dg/vect/pr97835.c
index 5ca477bf806..a90c773eac9 100644
--- a/gcc/testsuite/gcc.dg/vect/pr97835.c
+++ b/gcc/testsuite/gcc.dg/vect/pr97835.c
@@ -18,4 +18,5 @@ x0 (struct co *yy, long int kc, int wi, int md)
     }
 }
 
-/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
+/* We don't yet support SLP inductions for variable length vectors.  */
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { xfail 
vect_variable_length } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-49.c 
b/gcc/testsuite/gcc.dg/vect/slp-49.c
index 3f53baf707b..4141a09ed97 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-49.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-49.c
@@ -34,5 +34,6 @@ main()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
+/* We don't yet support SLP inductions for variable length vectors.  */
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { xfail 
vect_variable_length } } } */
 /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-slp-1.c 
b/gcc/testsuite/gcc.dg/vect/vect-outer-slp-1.c
index 62b18bd5764..445157d39b5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-slp-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-slp-1.c
@@ -27,5 +27,6 @@ void foo (void)
 
 /* We should vectorize this outer loop with SLP.  */
 /* { dg-final { scan-tree-dump "OUTER LOOP VECTORIZED" "vect" } } */
-/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
+/* We don't yet support SLP inductions for variable length vectors.  */
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { xfail 
vect_variable_length } } } */
 /* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-slp-2.c 
b/gcc/testsuite/gcc.dg/vect/vect-outer-slp-2.c
index 08b4fc52430..ec1e1036f57 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-slp-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-slp-2.c
@@ -48,4 +48,5 @@ int main ()
 }
 
 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } 
} */
+/* We don't yet support SLP inductions for variable length vectors.  */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { 
xfail vect_variable_length } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-slp-3.c 
b/gcc/testsuite/gcc.dg/vect/vect-outer-slp-3.c
index c67d3690bb4..53865d4737b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-slp-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-slp-3.c
@@ -59,4 +59,5 @@ int main ()
 }
 
 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } 
} */
+/* We don't yet support SLP inductions for variable length vectors.  */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { 
xfail vect_variable_length } } } */

Reply via email to