]> gcc.gnu.org Git - gcc.git/commitdiff
PR81738: Split vect-alias-check-6.c
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 10 Aug 2017 19:58:16 +0000 (19:58 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 10 Aug 2017 19:58:16 +0000 (19:58 +0000)
The second loop in the testcase only vectorises if we can reverse
a vector and if aligned loads aren't required.

2017-08-10  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
PR testsuite/81738
* gcc.dg/vect/vect-alias-check-6.c: Move second function to...
* gcc.dg/vect/vect-alias-check-7.c: ...this new file.  Require
vect_perm and vect_element_align for vectorization.

From-SVN: r251037

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-alias-check-6.c
gcc/testsuite/gcc.dg/vect/vect-alias-check-7.c [new file with mode: 0644]

index 0c5ac58bdc9a32645d17ca40ca9f9020592562f9..da63e03ae44d556fe4d1ad1c57e357e5b310dff3 100644 (file)
@@ -1,3 +1,10 @@
+2017-08-10  Richard Sandiford  <richard.sandiford@linaro.org>
+
+       PR testsuite/81738
+       * gcc.dg/vect/vect-alias-check-6.c: Move second function to...
+       * gcc.dg/vect/vect-alias-check-7.c: ...this new file.  Require
+       vect_perm and vect_element_align for vectorization.
+
 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/81736
index 0993c69a5bd306c83b665f18a39606dbec3d897e..5bb78f8ad5cf7912aff5284351e2ce0156aeaf94 100644 (file)
@@ -12,12 +12,5 @@ f1 (struct s *a, struct s *b)
     a->x[i + 1] += b->x[i];
 }
 
-void
-f2 (struct s *a, struct s *b)
-{
-  for (int i = 0; i < N; ++i)
-    a->x[i] += b->x[N - i - 1];
-}
-
-/* { dg-final { scan-tree-dump-times {checking that [^\n]* and [^\n]* have different addresses} 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
+/* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-7.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-7.c
new file mode 100644 (file)
index 0000000..812349d
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+#define N 16
+
+struct s { int x[N]; };
+
+void
+f1 (struct s *a, struct s *b)
+{
+  for (int i = 0; i < N; ++i)
+    a->x[i] += b->x[N - i - 1];
+}
+
+/* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_perm && vect_element_align } } } } */
This page took 0.096896 seconds and 5 git commands to generate.