aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/slp-42.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/slp-42.c')
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-42.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/slp-42.c b/gcc/testsuite/gcc.dg/vect/slp-42.c
new file mode 100644
index 0000000..ea5fe16
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/slp-42.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+int p[4096], q[4096];
+
+void foo (int n)
+{
+ int i;
+ for (i = 0; i < n; ++i)
+ {
+ p[i*4+0] = q[i*8+0] + q[i*8+4];
+ p[i*4+1] = q[i*8+1] + q[i*8+5];
+ p[i*4+2] = q[i*8+2] + q[i*8+6];
+ p[i*4+3] = q[i*8+3] + q[i*8+7];
+ }
+}
+
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */