+2016-01-16 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/parloops-exit-first-loop-alt.c: Move ...
+ * gcc.dg/autopar/parloops-exit-first-loop-alt.c: ... here. Remove
+ redundant dg-require-effective-target pthread.
+ * gcc.dg/parloops-exit-first-loop-alt-2.c: Same.
+ * gcc.dg/parloops-exit-first-loop-alt-3.c: Same.
+ * gcc.dg/parloops-exit-first-loop-alt-4.c: Same.
+ * gcc.dg/parloops-exit-first-loop-alt-5.c: Same.
+ * gcc.dg/parloops-exit-first-loop-alt-6.c: Same.
+ * gcc.dg/parloops-exit-first-loop-alt-7.c: Same.
+ * gcc.dg/parloops-exit-first-loop-alt-pr66652.c: Same.
+
2016-01-16 David Edelsohn <dje.gcc@gmail.com>
PR target/68609
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+/* Constant bound, vector addition. */
+
+#define N 1000
+
+unsigned int a[N];
+unsigned int b[N];
+unsigned int c[N];
+
+void
+f (void)
+{
+ int i;
+
+ for (i = 0; i < N; ++i)
+ c[i] = a[i] + b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+/* Variable bound, reduction. */
+
+unsigned int *a;
+
+unsigned int
+f (unsigned int n, unsigned int *__restrict__ a)
+{
+ int i;
+ unsigned int sum = 1;
+
+ for (i = 0; i < n; ++i)
+ sum += a[i];
+
+ return sum;
+}
+
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+/* Constant bound, reduction. */
+
+#define N 4000
+
+unsigned int *a;
+
+unsigned int
+f (void)
+{
+ int i;
+ unsigned int sum = 1;
+
+ for (i = 0; i < N; ++i)
+ sum += a[i];
+
+ return sum;
+}
+
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+/* Variable bound, vector addition, unsigned loop counter, unsigned bound. */
+
+void
+f (unsigned int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
+ unsigned int *__restrict__ c)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; ++i)
+ c[i] = a[i] + b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+/* Variable bound, vector addition, unsigned loop counter, signed bound. */
+
+void
+f (int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
+ unsigned int *__restrict__ c)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; ++i)
+ c[i] = a[i] + b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+/* Variable bound, vector addition, signed loop counter, signed bound. */
+
+void
+f (int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
+ unsigned int *__restrict__ c)
+{
+ int i;
+
+ for (i = 0; i < n; ++i)
+ c[i] = a[i] + b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+
+unsigned int
+f (unsigned int n, unsigned int sum)
+{
+ unsigned int i;
+
+ i = UINT_MAX;
+ do
+ {
+ sum += i % 13;
+ i++;
+ }
+ while (i < n - 1);
+
+ return sum;
+}
+
+/* { dg-final { scan-tree-dump-times "parallelizing inner loop" 1 "parloops" } } */
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 0 "parloops" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
+
+/* Variable bound, vector addition, signed loop counter, unsigned bound. */
+
+void
+f (unsigned int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
+ unsigned int *__restrict__ c)
+{
+ int i;
+
+ for (i = 0; i < n; ++i)
+ c[i] = a[i] + b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
+
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-/* Constant bound, vector addition. */
-
-#define N 1000
-
-unsigned int a[N];
-unsigned int b[N];
-unsigned int c[N];
-
-void
-f (void)
-{
- int i;
-
- for (i = 0; i < N; ++i)
- c[i] = a[i] + b[i];
-}
-
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-/* Variable bound, reduction. */
-
-unsigned int *a;
-
-unsigned int
-f (unsigned int n, unsigned int *__restrict__ a)
-{
- int i;
- unsigned int sum = 1;
-
- for (i = 0; i < n; ++i)
- sum += a[i];
-
- return sum;
-}
-
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-/* Constant bound, reduction. */
-
-#define N 4000
-
-unsigned int *a;
-
-unsigned int
-f (void)
-{
- int i;
- unsigned int sum = 1;
-
- for (i = 0; i < N; ++i)
- sum += a[i];
-
- return sum;
-}
-
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-/* Variable bound, vector addition, unsigned loop counter, unsigned bound. */
-
-void
-f (unsigned int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
- unsigned int *__restrict__ c)
-{
- unsigned int i;
-
- for (i = 0; i < n; ++i)
- c[i] = a[i] + b[i];
-}
-
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-/* Variable bound, vector addition, unsigned loop counter, signed bound. */
-
-void
-f (int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
- unsigned int *__restrict__ c)
-{
- unsigned int i;
-
- for (i = 0; i < n; ++i)
- c[i] = a[i] + b[i];
-}
-
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-/* Variable bound, vector addition, signed loop counter, signed bound. */
-
-void
-f (int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
- unsigned int *__restrict__ c)
-{
- int i;
-
- for (i = 0; i < n; ++i)
- c[i] = a[i] + b[i];
-}
-
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-
-unsigned int
-f (unsigned int n, unsigned int sum)
-{
- unsigned int i;
-
- i = UINT_MAX;
- do
- {
- sum += i % 13;
- i++;
- }
- while (i < n - 1);
-
- return sum;
-}
-
-/* { dg-final { scan-tree-dump-times "parallelizing inner loop" 1 "parloops" } } */
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 0 "parloops" } } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-require-effective-target pthread } */
-/* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */
-
-/* Variable bound, vector addition, signed loop counter, unsigned bound. */
-
-void
-f (unsigned int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b,
- unsigned int *__restrict__ c)
-{
- int i;
-
- for (i = 0; i < n; ++i)
- c[i] = a[i] + b[i];
-}
-
-/* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops" } } */
-