[gcc/devel/omp/gcc-13] openacc: Adjust test expectations to new "kernels" handling
Kwok Yeung
kcy@gcc.gnu.org
Fri May 19 16:45:02 GMT 2023
https://gcc.gnu.org/g:de46b33a209827316d3ba54a7363b6ff72b24fae
commit de46b33a209827316d3ba54a7363b6ff72b24fae
Author: Frederik Harwath <frederik@codesourcery.com>
Date: Tue Nov 16 16:22:48 2021 +0100
openacc: Adjust test expectations to new "kernels" handling
Adjust tests to changed expectations with the new Graphite-based
"kernels" handling.
libgomp/ChangeLog:
* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/pr84955-1.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/pr85486-2.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/pr85486-3.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/pr85486.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c: Adjust.
* testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c: Adjust.
* testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90: Adjust.
* testsuite/libgomp.oacc-fortran/pr94358-1.f90: Adjust.
* testsuite/libgomp.oacc-fortran/parallel-loop-auto-reduction-2.f90: Removed.
gcc/testsuite/ChangeLog:
* c-c++-common/goacc/acc-icf.c: Adjust.
* c-c++-common/goacc/cache-3-1.c: Adjust.
* c-c++-common/goacc/classify-kernels-unparallelized-graphite.c: Adjust.
* c-c++-common/goacc/classify-kernels.c: Adjust.
* c-c++-common/goacc/classify-serial.c: Adjust.
* c-c++-common/goacc/if-clause-2.c: Adjust.
* c-c++-common/goacc/kernels-decompose-1.c: Adjust.
* c-c++-common/goacc/kernels-decompose-2.c: Adjust.
* c-c++-common/goacc/kernels-decompose-ice-1.c: Adjust.
* c-c++-common/goacc/kernels-decompose-ice-2.c: Adjust.
* c-c++-common/goacc/kernels-loop-3-acc-loop.c: Adjust.
* c-c++-common/goacc/kernels-loop-3.c: Adjust.
* c-c++-common/goacc/loop-2-kernels.c: Adjust.
* c-c++-common/goacc/nested-reductions-2-parallel.c: Adjust.
* c-c++-common/goacc/note-parallelism-1-kernels-loop-auto.c: Adjust.
* c-c++-common/goacc/note-parallelism-1-kernels-loop-independent_seq.c: Adjust.
* c-c++-common/goacc/note-parallelism-1-kernels-loops.c: Adjust.
* c-c++-common/goacc/note-parallelism-1-kernels-straight-line.c: Adjust.
* c-c++-common/goacc/note-parallelism-combined-kernels-loop-auto.c: Adjust.
* c-c++-common/goacc/note-parallelism-combined-kernels-loop-independent_seq.c: Adjust.
* c-c++-common/goacc/note-parallelism-kernels-conditional-loop-independent_seq.c: Adjust.
* c-c++-common/goacc/note-parallelism-kernels-loop-auto.c: Adjust.
* c-c++-common/goacc/note-parallelism-kernels-loop-independent_seq.c: Adjust.
* c-c++-common/goacc/note-parallelism-kernels-loops.c: Adjust.
* c-c++-common/goacc/routine-1.c: Adjust.
* c-c++-common/goacc/routine-level-of-parallelism-2.c: Adjust.
* c-c++-common/goacc/routine-nohost-1.c: Adjust.
* c-c++-common/goacc/uninit-copy-clause.c: Adjust.
* gcc.dg/goacc/loop-processing-1.c: Adjust.
* gcc.dg/goacc/nested-function-1.c: Adjust.
* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Adjust.
* gfortran.dg/goacc/classify-kernels.f95: Adjust.
* gfortran.dg/goacc/classify-parallel.f95: Adjust.
* gfortran.dg/goacc/classify-routine.f95: Adjust.
* gfortran.dg/goacc/classify-serial.f95: Adjust.
* gfortran.dg/goacc/common-block-3.f90: Adjust.
* gfortran.dg/goacc/gang-static.f95: Adjust.
* gfortran.dg/goacc/kernels-decompose-1.f95: Adjust.
* gfortran.dg/goacc/kernels-decompose-2.f95: Adjust.
* gfortran.dg/goacc/kernels-loop-2.f95: Adjust.
* gfortran.dg/goacc/kernels-loop-data-2.f95: Adjust.
* gfortran.dg/goacc/kernels-loop-inner.f95: Adjust.
* gfortran.dg/goacc/kernels-loop.f95: Adjust.
* gfortran.dg/goacc/kernels-tree.f95: Adjust.
* gfortran.dg/goacc/loop-2-kernels.f95: Adjust.
* gfortran.dg/goacc/loop-auto-transfer-2.f90: Adjust.
* gfortran.dg/goacc/loop-auto-transfer-3.f90: Adjust.
* gfortran.dg/goacc/loop-auto-transfer-4.f90: Adjust.
* gfortran.dg/goacc/nested-function-1.f90: Adjust.
* gfortran.dg/goacc/nested-reductions-2-parallel.f90: Adjust.
* gfortran.dg/goacc/private-explicit-kernels-1.f95: Adjust.
* gfortran.dg/goacc/private-predetermined-kernels-1.f95: Adjust.
* gfortran.dg/goacc/routine-module-mod-1.f90: Adjust.
* gfortran.dg/goacc/uninit-copy-clause.f95: Adjust.
* c-c++-common/goacc/note-parallelism-1-kernels-conditional-loop-independent_seq.c: Removed.
Diff:
---
gcc/testsuite/ChangeLog.omp | 58 ++++++
gcc/testsuite/c-c++-common/goacc/acc-icf.c | 4 +-
gcc/testsuite/c-c++-common/goacc/cache-3-1.c | 2 +-
.../classify-kernels-unparallelized-graphite.c | 4 +-
.../c-c++-common/goacc/classify-kernels.c | 23 +--
gcc/testsuite/c-c++-common/goacc/classify-serial.c | 12 +-
gcc/testsuite/c-c++-common/goacc/if-clause-2.c | 2 +-
.../c-c++-common/goacc/kernels-decompose-1.c | 34 ++--
.../c-c++-common/goacc/kernels-decompose-2.c | 3 +-
.../c-c++-common/goacc/kernels-loop-3-acc-loop.c | 2 +-
gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c | 2 +-
gcc/testsuite/c-c++-common/goacc/loop-2-kernels.c | 20 +--
.../goacc/nested-reductions-2-parallel.c | 138 +++++++++++++++
...sm-1-kernels-conditional-loop-independent_seq.c | 129 --------------
.../goacc/note-parallelism-1-kernels-loop-auto.c | 104 +++++++----
...te-parallelism-1-kernels-loop-independent_seq.c | 19 +-
.../goacc/note-parallelism-1-kernels-loops.c | 4 +-
.../note-parallelism-1-kernels-straight-line.c | 2 +-
.../note-parallelism-combined-kernels-loop-auto.c | 34 ++--
...llelism-combined-kernels-loop-independent_seq.c | 16 --
...lism-kernels-conditional-loop-independent_seq.c | 38 ++--
.../goacc/note-parallelism-kernels-loop-auto.c | 100 ++++++-----
...note-parallelism-kernels-loop-independent_seq.c | 27 +--
.../goacc/note-parallelism-kernels-loops.c | 29 +--
gcc/testsuite/c-c++-common/goacc/routine-1.c | 2 +-
.../c-c++-common/goacc/routine-nohost-1.c | 2 +-
.../c-c++-common/goacc/uninit-copy-clause.c | 6 -
gcc/testsuite/gcc.dg/goacc/loop-processing-1.c | 2 +-
gcc/testsuite/gcc.dg/goacc/nested-function-1.c | 4 +-
.../goacc/classify-kernels-unparallelized.f95 | 26 +--
.../gfortran.dg/goacc/classify-kernels.f95 | 24 +--
.../gfortran.dg/goacc/classify-parallel.f95 | 6 +-
.../gfortran.dg/goacc/classify-routine.f95 | 8 +-
.../gfortran.dg/goacc/classify-serial.f95 | 11 +-
gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 | 8 +-
gcc/testsuite/gfortran.dg/goacc/gang-static.f95 | 14 +-
.../gfortran.dg/goacc/kernels-decompose-1.f95 | 196 +++++++++++++--------
.../gfortran.dg/goacc/kernels-decompose-2.f95 | 138 ++++++++-------
gcc/testsuite/gfortran.dg/goacc/kernels-loop-2.f95 | 14 +-
.../gfortran.dg/goacc/kernels-loop-data-2.f95 | 12 +-
.../gfortran.dg/goacc/kernels-loop-inner.f95 | 6 +-
gcc/testsuite/gfortran.dg/goacc/kernels-loop.f95 | 12 +-
gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95 | 2 +-
gcc/testsuite/gfortran.dg/goacc/loop-2-kernels.f95 | 22 +--
.../gfortran.dg/goacc/loop-auto-transfer-2.f90 | 2 -
.../gfortran.dg/goacc/loop-auto-transfer-3.f90 | 8 -
.../gfortran.dg/goacc/loop-auto-transfer-4.f90 | 30 ----
.../gfortran.dg/goacc/nested-function-1.f90 | 2 +
.../goacc/nested-reductions-2-parallel.f90 | 177 +++++++++++++++++++
.../goacc/private-explicit-kernels-1.f95 | 13 +-
.../goacc/private-predetermined-kernels-1.f95 | 16 +-
.../gfortran.dg/goacc/routine-module-mod-1.f90 | 2 +-
.../gfortran.dg/goacc/uninit-copy-clause.f95 | 2 -
libgomp/ChangeLog.omp | 22 +++
.../kernels-decompose-1.c | 8 +-
.../libgomp.oacc-c-c++-common/parallel-dims.c | 8 +-
.../libgomp.oacc-c-c++-common/pr84955-1.c | 1 -
.../libgomp.oacc-c-c++-common/pr85381-2.c | 8 +-
.../libgomp.oacc-c-c++-common/pr85381-4.c | 4 +-
.../libgomp.oacc-c-c++-common/pr85486-2.c | 2 +-
.../libgomp.oacc-c-c++-common/pr85486-3.c | 2 +-
.../testsuite/libgomp.oacc-c-c++-common/pr85486.c | 2 +-
.../vector-length-128-1.c | 5 +-
.../vector-length-128-2.c | 5 +-
.../vector-length-128-3.c | 5 +-
.../vector-length-128-4.c | 5 +-
.../vector-length-128-5.c | 5 +-
.../vector-length-128-6.c | 5 +-
.../vector-length-128-7.c | 5 +-
.../kernels-acc-loop-reduction-2.f90 | 12 +-
.../parallel-loop-auto-reduction-2.f90 | 98 -----------
.../testsuite/libgomp.oacc-fortran/pr94358-1.f90 | 2 -
72 files changed, 957 insertions(+), 820 deletions(-)
diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp
index f905e18bb10..f8961a0e90e 100644
--- a/gcc/testsuite/ChangeLog.omp
+++ b/gcc/testsuite/ChangeLog.omp
@@ -1,3 +1,61 @@
+2021-11-16 Frederik Harwath <frederik@codesourcery.com>
+
+ * c-c++-common/goacc/acc-icf.c: Adjust.
+ * c-c++-common/goacc/cache-3-1.c: Adjust.
+ * c-c++-common/goacc/classify-kernels-unparallelized-graphite.c: Adjust.
+ * c-c++-common/goacc/classify-kernels.c: Adjust.
+ * c-c++-common/goacc/classify-serial.c: Adjust.
+ * c-c++-common/goacc/if-clause-2.c: Adjust.
+ * c-c++-common/goacc/kernels-decompose-1.c: Adjust.
+ * c-c++-common/goacc/kernels-decompose-2.c: Adjust.
+ * c-c++-common/goacc/kernels-decompose-ice-1.c: Adjust.
+ * c-c++-common/goacc/kernels-decompose-ice-2.c: Adjust.
+ * c-c++-common/goacc/kernels-loop-3-acc-loop.c: Adjust.
+ * c-c++-common/goacc/kernels-loop-3.c: Adjust.
+ * c-c++-common/goacc/loop-2-kernels.c: Adjust.
+ * c-c++-common/goacc/nested-reductions-2-parallel.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-1-kernels-loop-auto.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-1-kernels-loop-independent_seq.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-1-kernels-loops.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-1-kernels-straight-line.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-combined-kernels-loop-auto.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-combined-kernels-loop-independent_seq.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-kernels-conditional-loop-independent_seq.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-kernels-loop-auto.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-kernels-loop-independent_seq.c: Adjust.
+ * c-c++-common/goacc/note-parallelism-kernels-loops.c: Adjust.
+ * c-c++-common/goacc/routine-1.c: Adjust.
+ * c-c++-common/goacc/routine-level-of-parallelism-2.c: Adjust.
+ * c-c++-common/goacc/routine-nohost-1.c: Adjust.
+ * c-c++-common/goacc/uninit-copy-clause.c: Adjust.
+ * gcc.dg/goacc/loop-processing-1.c: Adjust.
+ * gcc.dg/goacc/nested-function-1.c: Adjust.
+ * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Adjust.
+ * gfortran.dg/goacc/classify-kernels.f95: Adjust.
+ * gfortran.dg/goacc/classify-parallel.f95: Adjust.
+ * gfortran.dg/goacc/classify-routine.f95: Adjust.
+ * gfortran.dg/goacc/classify-serial.f95: Adjust.
+ * gfortran.dg/goacc/common-block-3.f90: Adjust.
+ * gfortran.dg/goacc/gang-static.f95: Adjust.
+ * gfortran.dg/goacc/kernels-decompose-1.f95: Adjust.
+ * gfortran.dg/goacc/kernels-decompose-2.f95: Adjust.
+ * gfortran.dg/goacc/kernels-loop-2.f95: Adjust.
+ * gfortran.dg/goacc/kernels-loop-data-2.f95: Adjust.
+ * gfortran.dg/goacc/kernels-loop-inner.f95: Adjust.
+ * gfortran.dg/goacc/kernels-loop.f95: Adjust.
+ * gfortran.dg/goacc/kernels-tree.f95: Adjust.
+ * gfortran.dg/goacc/loop-2-kernels.f95: Adjust.
+ * gfortran.dg/goacc/loop-auto-transfer-2.f90: Adjust.
+ * gfortran.dg/goacc/loop-auto-transfer-3.f90: Adjust.
+ * gfortran.dg/goacc/loop-auto-transfer-4.f90: Adjust.
+ * gfortran.dg/goacc/nested-function-1.f90: Adjust.
+ * gfortran.dg/goacc/nested-reductions-2-parallel.f90: Adjust.
+ * gfortran.dg/goacc/private-explicit-kernels-1.f95: Adjust.
+ * gfortran.dg/goacc/private-predetermined-kernels-1.f95: Adjust.
+ * gfortran.dg/goacc/routine-module-mod-1.f90: Adjust.
+ * gfortran.dg/goacc/uninit-copy-clause.f95: Adjust.
+ * c-c++-common/goacc/note-parallelism-1-kernels-conditional-loop-independent_seq.c: Removed.
+
2021-11-16 Frederik Harwath <frederik@codesourcery.com>
* gcc.dg/goacc/graphite-parameter-1.c: New test.
diff --git a/gcc/testsuite/c-c++-common/goacc/acc-icf.c b/gcc/testsuite/c-c++-common/goacc/acc-icf.c
index bc2e0fd19b9..9cf119bf89c 100644
--- a/gcc/testsuite/c-c++-common/goacc/acc-icf.c
+++ b/gcc/testsuite/c-c++-common/goacc/acc-icf.c
@@ -9,7 +9,7 @@
/* { dg-bogus "warning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .+3 }
TODO It's the compiler's own decision to not use 'worker' parallelism here, so it doesn't make sense to bother the user about it. */
int
-routine1 (int n) /* { dg-bogus "region is worker partitioned but does not contain worker partitioned code" "" { xfail *-*-* } } */
+routine1 (int n)
{
int i;
@@ -24,7 +24,7 @@ routine1 (int n) /* { dg-bogus "region is worker partitioned but does not contai
/* { dg-bogus "warning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .+3 }
TODO It's the compiler's own decision to not use 'worker' parallelism here, so it doesn't make sense to bother the user about it. */
int
-routine2 (int n) /* { dg-bogus "region is worker partitioned but does not contain worker partitioned code" "" { xfail *-*-* } } */
+routine2 (int n)
{
int i;
diff --git a/gcc/testsuite/c-c++-common/goacc/cache-3-1.c b/gcc/testsuite/c-c++-common/goacc/cache-3-1.c
index 5318a57d51e..36235f6d49f 100644
--- a/gcc/testsuite/c-c++-common/goacc/cache-3-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/cache-3-1.c
@@ -31,7 +31,7 @@ foo (int g[3][10], int h[4][8], int i[2][10], int j[][9],
;
#pragma acc cache(t[2:5]) /* { dg-error "is threadprivate variable" } */
;
- #pragma acc cache(k[0.5:]) /* { dg-error "low bound \[^\n\r]* of array section does not have integral type" } */
+ #pragma acc cache(k[0.5:]) /* { dg-error "low bound \[^\n\r]* of array section does not have integral type" } */
;
#pragma acc cache(l[:7.5f]) /* { dg-error "length \[^\n\r]* of array section does not have integral type" } */
;
diff --git a/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-graphite.c b/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-graphite.c
index 77f4524907a..721b34acd9a 100644
--- a/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-graphite.c
+++ b/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-graphite.c
@@ -2,7 +2,6 @@
OpenACC 'kernels' with Graphite kernles handling (default). */
/* { dg-additional-options "-O2" }
- { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
{ dg-additional-options "-fopt-info-optimized-omp" }
{ dg-additional-options "-fopt-info-note-omp" }
{ dg-additional-options "-fdump-tree-ompexp" }
@@ -22,7 +21,8 @@ extern unsigned int f (unsigned int);
void KERNELS ()
{
#pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N])
- for (unsigned int i = 0; i < N; i++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
+ for (unsigned int i = 0; i < N; i++)
+ /* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } .-1 } */
/* An "extern"al mapping of loop iterations/array indices makes the loop
unparallelizable. */
c[i] = a[f (i)] + b[f (i)]; /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
diff --git a/gcc/testsuite/c-c++-common/goacc/classify-kernels.c b/gcc/testsuite/c-c++-common/goacc/classify-kernels.c
index 21b12dcfa51..b1266d45c83 100644
--- a/gcc/testsuite/c-c++-common/goacc/classify-kernels.c
+++ b/gcc/testsuite/c-c++-common/goacc/classify-kernels.c
@@ -4,10 +4,9 @@
/* { dg-additional-options "--param openacc-kernels=decompose" } */
/* { dg-additional-options "-O2" }
- { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
- { dg-additional-options "-fopt-info-all-omp" }
+ { dg-additional-options "-fopt-info-optimized-omp" }
+ { dg-additional-options "-fopt-info-note-omp" }
{ dg-additional-options "-fdump-tree-ompexp" }
- { dg-additional-options "-fdump-tree-parloops1-all" }
{ dg-additional-options "-fdump-tree-oaccloops1" } */
/* { dg-additional-options "--param=openacc-privatization=noisy" }
@@ -30,23 +29,13 @@ void KERNELS ()
/* { dg-note {variable 'i' made addressable} {} { target *-*-* } l_compute1 } */
/* { dg-note {variable 'i' declared in block is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_compute1 } */
/* { dg-note {variable '[abc]\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute1 } */
- /* { dg-optimized {assigned OpenACC gang loop parallelism} {} { target *-*-* } l_compute1 } */
- /* { dg-note {beginning 'Graphite' region in OpenACC 'kernels' construct} {} { target *-*-* } .+1 } */
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; i++) /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" } */
+ /* { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } .-1 } */
c[i] = a[i] + b[i];
}
-/* Check the offloaded function's attributes.
- { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "ompexp" } } */
-
-/* Check that exactly one OpenACC kernels construct is analyzed, and that it
- can be parallelized.
- { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops1" } }
- { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "parloops1" } }
- { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } } */
-
/* Check the offloaded function's classification and compute dimensions (will
always be 1 x 1 x 1 for non-offloading compilation).
- { dg-final { scan-tree-dump-times "(?n)Function is parallelized OpenACC kernels offload" 1 "oaccloops1" } }
+ { dg-final { scan-tree-dump-times "(?n)Function is parallel_kernels_graphite OpenACC kernels offload" 1 "oaccloops1" } }
{ dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops1" } }
- { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "oaccloops1" } } */
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc parallel_kernels_graphite, omp target entrypoint, noclone\\)\\)" 1 "oaccloops1" } } */
diff --git a/gcc/testsuite/c-c++-common/goacc/classify-serial.c b/gcc/testsuite/c-c++-common/goacc/classify-serial.c
index 6480fe30046..f892009de35 100644
--- a/gcc/testsuite/c-c++-common/goacc/classify-serial.c
+++ b/gcc/testsuite/c-c++-common/goacc/classify-serial.c
@@ -4,7 +4,7 @@
/* { dg-additional-options "-O2" }
{ dg-additional-options "-fopt-info-optimized-omp" }
{ dg-additional-options "-fdump-tree-ompexp" }
- { dg-additional-options "-fdump-tree-oaccloops" } */
+ { dg-additional-options "-fdump-tree-oaccloops1" } */
/* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
aspects of that functionality. */
@@ -18,9 +18,7 @@ extern unsigned int *__restrict c;
void SERIAL ()
{
#pragma acc serial loop copyin (a[0:N], b[0:N]) copyout (c[0:N]) /* { dg-line l_compute_loop_i1 } */
- /* { dg-bogus "warning: region contains gang partitioned code but is not gang partitioned" "TODO 'serial'" { xfail *-*-* } l_compute_loop_i1 }
- { dg-bogus "warning: region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } l_compute_loop_i1 }
- { dg-bogus "warning: region contains vector partitioned code but is not vector partitioned" "TODO 'serial'" { xfail *-*-* } l_compute_loop_i1 }
+ /* { dg-bogus "warning: region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } l_compute_loop_i1 }
TODO Should we really diagnose this if the user explicitly requested 'serial'?
TODO Should we instead diagnose ('-Wextra' category?) that the user may enable use of parallelism if replacing 'serial' with 'parallel', if applicable? */
/* { dg-optimized {assigned OpenACC gang vector loop parallelism} {} { target *-*-* } l_compute_loop_i1 } */
@@ -33,6 +31,6 @@ void SERIAL ()
/* Check the offloaded function's classification and compute dimensions (will
always be 1 x 1 x 1 for non-offloading compilation).
- { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccloops" } }
- { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
- { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint, noclone\\)\\)" 1 "oaccloops" } } */
+ { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccloops1" } }
+ { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops1" } }
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint, noclone\\)\\)" 1 "oaccloops1" } } */
diff --git a/gcc/testsuite/c-c++-common/goacc/if-clause-2.c b/gcc/testsuite/c-c++-common/goacc/if-clause-2.c
index a48072509e1..96e36cac6ee 100644
--- a/gcc/testsuite/c-c++-common/goacc/if-clause-2.c
+++ b/gcc/testsuite/c-c++-common/goacc/if-clause-2.c
@@ -11,7 +11,7 @@ f (short c)
#pragma acc kernels if(c) copy(c)
/* { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_kernels map\(tofrom:c \[len: [0-9]+\]\) if\(_[0-9]+\)$} 1 "gimple" } } */
/* { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_data_kernels map\(tofrom:c \[len: [0-9]+\]\) if\(_[0-9]+\)$} 1 "omp_oacc_kernels_decompose" } }
- { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_gang_single async\(-1\) num_gangs\(1\) map\(force_present:c \[len: [0-9]+\]\) if\(_[0-9]+\)$} 1 "omp_oacc_kernels_decompose" } } */
+ { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_graphite async\(-1\) map\(force_present:c \[len: [0-9]+\]\) if\(_[0-9]+\)$} 1 "omp_oacc_kernels_decompose" } } */
++c;
#pragma acc data if(c) copy(c)
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c
index e58bc179f30..0d44f5ed3b1 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c
@@ -1,11 +1,13 @@
/* Test OpenACC 'kernels' construct decomposition. */
+/* { dg-additional-options "-fopt-info-optimized-omp" } */
+/* { dg-additional-options "-O2" } for "Graphite". */
/* { dg-additional-options "-fopt-info-omp-all" } */
/* { dg-additional-options "-fdump-tree-gimple" } */
/* { dg-additional-options "--param=openacc-kernels=decompose" }
- { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" } */
+ { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose-details" } */
/* { dg-additional-options "--param=openacc-privatization=noisy" }
Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
@@ -34,43 +36,34 @@ main (void)
int i;
unsigned int sum = 1;
-#pragma acc kernels copyin(a[0:N]) copy(sum) /* { dg-line l_compute[incr c_compute] } */
- /* { dg-note {variable 'sum\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
- /* { dg-bogus {optimized: assigned OpenACC seq loop parallelism} TODO { xfail *-*-* } l_compute$c_compute }
- TODO Is this maybe the report that belongs to the XFAILed report further down? */
+#pragma acc kernels copyin(a[0:N]) copy(sum) /* { dg-line l_kernels_pragma } */
+ /* { dg-missed {'map\(tofrom:sum \[len: [0-9]+\]\)' not optimized: sum is unsuitable for privatization} "TODO Missing synthetic reduction clause" { target *-*-* } l_kernels_pragma } */
{
#pragma acc loop /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
- /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
- /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
sum++;
a[0]++;
#pragma acc loop independent /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i } */
- /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
- /* { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-optimized "assigned OpenACC gang vector loop parallelism" "" {target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-warning {loop has "independent" clause but data dependences were found.} "" { target *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
- /* { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
if (sum > 10)
{
#pragma acc loop /* { dg-line l_loop_i[incr c_loop_i] } */
/* { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_i$c_loop_i } */
- /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
- /*TODO { dg-optimized "assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
}
#pragma acc loop auto /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
- /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
@@ -90,18 +83,17 @@ main (void)
sequence of compute constructs.
{ dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_data_kernels map\(tofrom:sum \[len: [0-9]+\]\) map\(to:a\[0\] \[len: [0-9]+\]\)$} 1 "omp_oacc_kernels_decompose" } }
As noted above, we get three "old-style" kernel regions, one gang-single region, and one parallelized loop region.
- { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_kernels async\(-1\) map\(force_present:sum \[len: [0-9]+\]\) map\(force_present:a\[0\] \[len: [0-9]+\]\) map\(firstprivate:a \[pointer assign, bias: 0\]\)$} 3 "omp_oacc_kernels_decompose" } }
- { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_parallelized async\(-1\) map\(force_present:sum \[len: [0-9]+\]\) map\(force_present:a\[0\] \[len: [0-9]+\]\) map\(firstprivate:a \[pointer assign, bias: 0\]\)$} 1 "omp_oacc_kernels_decompose" } }
- { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_gang_single async\(-1\) num_gangs\(1\) map\(force_present:sum \[len: [0-9]+\]\) map\(force_present:a\[0\] \[len: [0-9]+\]\) map\(firstprivate:a \[pointer assign, bias: 0\]\)$} 1 "omp_oacc_kernels_decompose" } }
+ { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_graphite async\(-1\) map\(force_present:sum \[len: [0-9]+\]\) map\(force_present:a\[0\] \[len: [0-9]+\]\) map\(firstprivate:a \[pointer assign, bias: 0\]\)$} 5 "omp_oacc_kernels_decompose" } }
'data' plus five CCs.
{ dg-final { scan-tree-dump-times {(?n)#pragma omp target } 6 "omp_oacc_kernels_decompose" } }
- { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\)$} 2 "omp_oacc_kernels_decompose" } }
+ { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\)$} 1 "omp_oacc_kernels_decompose" } }
{ dg-final { scan-tree-dump-times {(?n)#pragma acc loop independent private\(i\)$} 1 "omp_oacc_kernels_decompose" } }
- { dg-final { scan-tree-dump-times {(?n)#pragma acc loop auto private\(i\)$} 1 "omp_oacc_kernels_decompose" } }
+ { dg-final { scan-tree-dump-times {(?n)#pragma acc loop auto private\(i\)$} 2 "omp_oacc_kernels_decompose" } }
{ dg-final { scan-tree-dump-times {(?n)#pragma acc loop} 4 "omp_oacc_kernels_decompose" } }
Each of the parallel regions is async, and there is a final call to
__builtin_GOACC_wait.
{ dg-final { scan-tree-dump-times "__builtin_GOACC_wait" 1 "omp_oacc_kernels_decompose" } } */
+
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c
index b9bf045aecc..c93ccd802bd 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c
@@ -2,8 +2,7 @@
/* { dg-additional-options "-fno-openacc-kernels-annotate-loops" } */
/* { dg-additional-options "-fopt-info-omp-all" } */
-
-/* { dg-additional-options "--param=openacc-kernels=decompose" }
+/* { dg-additional-options "--param=openacc-kernels=decompose-parloops" }
/* { dg-additional-options "-O2" } for 'parloops'. */
/* { dg-additional-options "--param=openacc-privatization=noisy" }
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-3-acc-loop.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-3-acc-loop.c
index e715c488e94..a9098ac531f 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-3-acc-loop.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-3-acc-loop.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "--param=openacc-kernels=parloops" } as this is
+/* { dg-additional-options "--param openacc-kernels=decompose-parloops" } as this is
specifically testing "parloops" handling. */
/* { dg-additional-options "-O2" } */
/* { dg-additional-options "-fdump-tree-parloops1-all" } */
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c
index c70823fdf87..3e9db6f5145 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "--param=openacc-kernels=parloops" } as this is
+/* { dg-additional-options "--param openacc-kernels=decompose-parloops" } as this is
specifically testing "parloops" handling. */
/* { dg-additional-options "-O2" } */
/* { dg-additional-options "-fno-openacc-kernels-annotate-loops" } */
diff --git a/gcc/testsuite/c-c++-common/goacc/loop-2-kernels.c b/gcc/testsuite/c-c++-common/goacc/loop-2-kernels.c
index c989222669c..143ef0a7905 100644
--- a/gcc/testsuite/c-c++-common/goacc/loop-2-kernels.c
+++ b/gcc/testsuite/c-c++-common/goacc/loop-2-kernels.c
@@ -37,7 +37,7 @@ void K(void)
for (j = 0; j < 10; j++)
{ }
}
-#pragma acc loop seq gang // { dg-error "'seq' overrides" "TODO" { xfail *-*-* } }
+#pragma acc loop seq gang // { dg-error "'seq' overrides" }
for (i = 0; i < 10; i++)
{ }
@@ -59,11 +59,11 @@ void K(void)
#pragma acc loop worker // { dg-error "inner loop uses same" }
for (j = 0; j < 10; j++)
{ }
-#pragma acc loop gang
+#pragma acc loop gang /* { dg-bogus "incorrectly nested OpenACC loop parallelism" "TODO-kernels" { xfail *-*-* } } */
for (j = 0; j < 10; j++)
{ }
}
-#pragma acc loop seq worker // { dg-error "'seq' overrides" "TODO" { xfail *-*-* } }
+#pragma acc loop seq worker // { dg-error "'seq' overrides" }
for (i = 0; i < 10; i++)
{ }
#pragma acc loop gang worker
@@ -85,14 +85,14 @@ void K(void)
#pragma acc loop vector // { dg-error "inner loop uses same" }
for (j = 1; j < 10; j++)
{ }
-#pragma acc loop worker
+#pragma acc loop worker /* { dg-bogus "incorrectly nested OpenACC loop parallelism" "TODO-kernels" { xfail *-*-* } } */
for (j = 1; j < 10; j++)
{ }
-#pragma acc loop gang
+#pragma acc loop gang /* { dg-bogus "incorrectly nested OpenACC loop parallelism" "TODO-kernels" { xfail *-*-* } } */
for (j = 1; j < 10; j++)
{ }
}
-#pragma acc loop seq vector // { dg-error "'seq' overrides" "TODO" { xfail *-*-* } }
+#pragma acc loop seq vector // { dg-error "'seq' overrides" }
for (i = 0; i < 10; i++)
{ }
#pragma acc loop gang vector
@@ -105,7 +105,7 @@ void K(void)
#pragma acc loop auto
for (i = 0; i < 10; i++)
{ }
-#pragma acc loop seq auto // { dg-error "'seq' overrides" "TODO" { xfail *-*-* } }
+#pragma acc loop seq auto // { dg-error "'seq' overrides" }
for (i = 0; i < 10; i++)
{ }
#pragma acc loop gang auto // { dg-error "'auto' conflicts" }
@@ -147,7 +147,7 @@ void K(void)
#pragma acc kernels loop worker(num:5)
for (i = 0; i < 10; i++)
{ }
-#pragma acc kernels loop seq worker // { dg-error "'seq' overrides" "TODO" { xfail *-*-* } }
+#pragma acc kernels loop seq worker // { dg-error "'seq' overrides" }
for (i = 0; i < 10; i++)
{ }
#pragma acc kernels loop gang worker
@@ -163,7 +163,7 @@ void K(void)
#pragma acc kernels loop vector(length:5)
for (i = 0; i < 10; i++)
{ }
-#pragma acc kernels loop seq vector // { dg-error "'seq' overrides" "TODO" { xfail *-*-* } }
+#pragma acc kernels loop seq vector // { dg-error "'seq' overrides" }
for (i = 0; i < 10; i++)
{ }
#pragma acc kernels loop gang vector
@@ -176,7 +176,7 @@ void K(void)
#pragma acc kernels loop auto
for (i = 0; i < 10; i++)
{ }
-#pragma acc kernels loop seq auto // { dg-error "'seq' overrides" "TODO" { xfail *-*-* } }
+#pragma acc kernels loop seq auto // { dg-error "'seq' overrides" }
for (i = 0; i < 10; i++)
{ }
#pragma acc kernels loop gang auto // { dg-error "'auto' conflicts" }
diff --git a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c
index 840ed86adef..4ec540f33ca 100644
--- a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c
+++ b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c
@@ -401,3 +401,141 @@ void acc_parallel_loop_reduction (void)
}
}
}
+
+/* The same tests as above, but inside a routine construct. */
+#pragma acc routine gang
+void acc_routine (void)
+{
+ int i, j, k, l, sum, diff;
+
+ {
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(+:sum)
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop collapse(2) // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ for (j = 0; j < 10; j++)
+ for (k = 0; k < 10; k++)
+ #pragma acc loop reduction(+:sum)
+ for (l = 0; l < 10; l++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ // { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ for (k = 0; k < 10; k++)
+ #pragma acc loop reduction(+:sum)
+ for (l = 0; l < 10; l++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(+:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(-:sum)
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ // { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ for (k = 0; k < 10; k++)
+ #pragma acc loop reduction(*:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (l = 0; l < 10; l++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(+:sum) // { dg-warning "conflicting reduction operations for .sum." })
+ // { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ for (k = 0; k < 10; k++)
+ #pragma acc loop reduction(*:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (l = 0; l < 10; l++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum) reduction(-:diff)
+ for (i = 0; i < 10; i++)
+ {
+ #pragma acc loop reduction(-:diff) // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(+:sum)
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum) // { dg-warning "nested loop in reduction needs reduction clause for .diff." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(-:diff)
+ for (k = 0; k < 10; k++)
+ diff = 1;
+ }
+ }
+}
+
+void acc_kernels (void)
+{
+ int i, j, k, sum, diff;
+
+ /* FIXME: No diagnostics are produced for these loops because reductions
+ in kernels regions are not supported yet. */
+ #pragma acc kernels
+ {
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop
+ for (j = 0; j < 10; j++)
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop reduction(-:diff)
+ for (j = 0; j < 10; j++)
+ #pragma acc loop
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(+:sum)
+ for (k = 0; k < 10; k++)
+ sum = 1;
+
+ #pragma acc loop reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (j = 0; j < 10; j++)
+ #pragma acc loop reduction(+:sum) // { dg-warning "conflicting reduction operations for .sum." }
+ for (k = 0; k < 10; k++)
+ sum = 1;
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-conditional-loop-independent_seq.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-conditional-loop-independent_seq.c
deleted file mode 100644
index b3f4e24173a..00000000000
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-conditional-loop-independent_seq.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Test the output of "-fopt-info-optimized-omp" for an OpenACC 'kernels'
- construct containing conditionally executed 'loop' constructs with
- 'independent' or 'seq' clauses. */
-
-/* { dg-additional-options "-fopt-info-all-omp" } */
-
-//TODO update accordingly
-/* See also "../../gfortran.dg/goacc/note-parallelism.f90". */
-
-extern int c;
-
-int
-main ()
-{
- int x, y, z;
-
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* Strangely indented to keep this similar to other test cases. */
- if (c) /* { dg-message "optimized: beginning .Graphite. region in OpenACC .kernels. construct" } */
- {
-#pragma acc loop seq
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent gang
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent worker
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent vector
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent gang vector
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent gang worker
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent worker vector
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent gang worker vector
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent gang
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop independent worker
- for (y = 0; y < 10; y++)
-#pragma acc loop independent vector
- for (z = 0; z < 10; z++)
- ;
-
-#pragma acc loop independent
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
- ;
-
-#pragma acc loop independent
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop independent
- for (y = 0; y < 10; y++)
- ;
-
-#pragma acc loop independent
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop independent
- for (y = 0; y < 10; y++)
-#pragma acc loop independent
- for (z = 0; z < 10; z++)
- ;
-
-#pragma acc loop seq
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop independent
- for (y = 0; y < 10; y++)
-#pragma acc loop independent
- for (z = 0; z < 10; z++)
- ;
-
-#pragma acc loop independent
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop seq
- for (y = 0; y < 10; y++)
-#pragma acc loop independent
- for (z = 0; z < 10; z++)
- ;
-
-#pragma acc loop independent
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop independent
- for (y = 0; y < 10; y++)
-#pragma acc loop seq
- for (z = 0; z < 10; z++)
- ;
-
-#pragma acc loop seq
- /* { dg-message "missed: unparallelized loop nest in OpenACC .kernels. region: it's executed conditionally" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop independent
- for (y = 0; y < 10; y++)
-#pragma acc loop seq
- for (z = 0; z < 10; z++)
- ;
- }
-
- return 0;
-}
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-auto.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-auto.c
index b0313796ade..8ad66252497 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-auto.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-auto.c
@@ -2,6 +2,7 @@
construct containing 'loop' constructs with explicit or implicit 'auto'
clause. */
+/* { dg-additional-options "-fopt-info-optimized-omp" } */
/* { dg-additional-options "-fopt-info-note-omp" } */
//TODO update accordingly
@@ -15,109 +16,136 @@ main ()
#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
{
-#pragma acc loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang
+ /* { dg-message "optimized: assigned OpenACC gang loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto worker
+ /* { dg-message "optimized: assigned OpenACC worker loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto vector
+ /* { dg-message "optimized: assigned OpenACC vector loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang vector
+ /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang worker
+ /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto worker vector
+ /* { dg-message "optimized: assigned OpenACC worker vector loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang worker vector
+ /* { dg-message "optimized: assigned OpenACC gang worker vector loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang
+ /* { dg-message "optimized: assigned OpenACC gang loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-3 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
+#pragma acc loop auto worker
+ /* { dg-message "optimized: assigned OpenACC worker loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-2 } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
+#pragma acc loop auto vector
+ /* { dg-message "optimized: assigned OpenACC vector loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-*} .-2 } */
for (z = 0; z < 10; z++)
;
#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "optimized: assigned OpenACC seq loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "optimized: assigned OpenACC seq loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
;
#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "optimized: assigned OpenACC seq loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "optimized: assigned OpenACC seq loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "optimized: assigned OpenACC seq loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
-#pragma acc loop
+#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "optimized: assigned OpenACC seq loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop
+#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "optimized: assigned OpenACC seq loop parallelism" "" { target *-*-*} .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop
+#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
}
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-independent_seq.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-independent_seq.c
index 9eb846325a6..8d20840ef28 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-independent_seq.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loop-independent_seq.c
@@ -3,10 +3,13 @@
clauses. */
/* { dg-additional-options "-fopt-info-all-omp" } */
+/* { dg-additional-options "-O2" } */
//TODO update accordingly
/* See also "../../gfortran.dg/goacc/note-parallelism.f90". */
+/* { dg-prune-output "^.*?loop in .kernels. region has not been analyzed.*?$" } */
+
int
main ()
{
@@ -16,47 +19,38 @@ main ()
/* Strangely indented to keep this similar to other test cases. */
{
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent vector /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent gang vector /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent gang worker /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent worker vector /* { dg-message "optimized: assigned OpenACC worker vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent gang worker vector /* { dg-message "optimized: assigned OpenACC gang worker vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -65,19 +59,16 @@ main ()
;
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
for (y = 0; y < 10; y++)
;
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -86,7 +77,6 @@ main ()
;
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -95,7 +85,6 @@ main ()
;
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -104,7 +93,6 @@ main ()
;
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -113,7 +101,6 @@ main ()
;
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
for (y = 0; y < 10; y++)
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loops.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loops.c
index 6cf51904e7a..52411235765 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loops.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-loops.c
@@ -2,7 +2,7 @@
construct containing loops. */
/* { dg-additional-options "-fno-openacc-kernels-annotate-loops" } */
-/* { dg-additional-options "-fopt-info-optimized-omp-note" } */
+/* { dg-additional-options "-fopt-info-optimized-note-omp" } */
//TODO update accordingly
/* See also "../../gfortran.dg/goacc/note-parallelism.f90". */
@@ -20,7 +20,7 @@ main ()
/* Strangely indented to keep this similar to other test cases. */
{
- for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. region in OpenACC .kernels. construct" } */
+ for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
;
for (x = 0; x < 10; x++)
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-straight-line.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-straight-line.c
index d4cb2364737..a3fc0cb9657 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-straight-line.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-1-kernels-straight-line.c
@@ -37,7 +37,7 @@ main ()
/* { dg-optimized {'map\(force_tofrom:x \[len: [0-9]+\]\[implicit\]\)' optimized to 'map\(to:x \[len: [0-9]+\]\[implicit\]\)'} "" { target *-*-* } l_pragma_kernels } */
/* { dg-optimized {'map\(to:x \[len: [0-9]+\]\[implicit\]\)' further optimized to 'private\(x\)'} "" { target *-*-* } l_pragma_kernels } */
{
- x = 0; /* { dg-message "note: beginning .gang-single. part in OpenACC .kernels. region" } */
+ x = 0; /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
y = x < 10;
z = x++;
;
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-auto.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-auto.c
index a4f721067cc..a189ef498c2 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-auto.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-auto.c
@@ -1,4 +1,4 @@
-/* Test the output of "-fopt-info-optimized-omp" for combined OpenACC 'kernels
+/* Test the output of "-fopt-info-note-omp" for combined OpenACC 'kernels
loop' constructs with explicit or implicit 'auto' clause. */
/* { dg-additional-options "-fopt-info-note-omp" } */
@@ -12,47 +12,47 @@ main ()
int x, y, z;
#pragma acc kernels loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto gang vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto gang worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto gang worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
for (y = 0; y < 10; y++)
@@ -61,19 +61,19 @@ main ()
;
#pragma acc kernels loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
for (y = 0; y < 10; y++)
;
#pragma acc kernels loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
for (y = 0; y < 10; y++)
@@ -82,7 +82,7 @@ main ()
;
#pragma acc kernels loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
for (y = 0; y < 10; y++)
@@ -91,7 +91,7 @@ main ()
;
#pragma acc kernels loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop
for (y = 0; y < 10; y++)
@@ -100,7 +100,7 @@ main ()
;
#pragma acc kernels loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
for (y = 0; y < 10; y++)
@@ -109,7 +109,7 @@ main ()
;
#pragma acc kernels loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
for (y = 0; y < 10; y++)
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-independent_seq.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-independent_seq.c
index 54960918d8c..9ad36a9ab5f 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-independent_seq.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-combined-kernels-loop-independent_seq.c
@@ -12,47 +12,38 @@ main ()
int x, y, z;
#pragma acc kernels loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent vector /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent gang vector /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent gang worker /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent worker vector /* { dg-message "optimized: assigned OpenACC worker vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent gang worker vector /* { dg-message "optimized: assigned OpenACC gang worker vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -61,19 +52,16 @@ main ()
;
#pragma acc kernels loop independent /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
for (y = 0; y < 10; y++)
;
#pragma acc kernels loop independent /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -82,7 +70,6 @@ main ()
;
#pragma acc kernels loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -91,7 +78,6 @@ main ()
;
#pragma acc kernels loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -100,7 +86,6 @@ main ()
;
#pragma acc kernels loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -109,7 +94,6 @@ main ()
;
#pragma acc kernels loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
for (y = 0; y < 10; y++)
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-conditional-loop-independent_seq.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-conditional-loop-independent_seq.c
index 0a3babe7a44..c26a7b40951 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-conditional-loop-independent_seq.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-conditional-loop-independent_seq.c
@@ -1,8 +1,10 @@
-/* Test the output of "-fopt-info-optimized-omp" for OpenACC 'kernels'
+/* Test the output of "-fopt-info-note-omp" for OpenACC 'kernels'
constructs containing conditionally executed 'loop' constructs with
'independent' or 'seq' clauses. */
-/* { dg-additional-options "-fopt-info-all-omp" } */
+/* { dg-additional-options "-fopt-info-note-omp" } */
+/* { dg-additional-options "-fopt-info-missed-omp" } */
+/* { dg-additional-options "--param openacc-kernels=decompose-parloops" } */
//TODO update accordingly
/* See also "../../gfortran.dg/goacc/note-parallelism.f90". */
@@ -14,7 +16,7 @@ main ()
{
int x, y, z;
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -24,7 +26,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -34,7 +36,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -44,7 +46,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -54,7 +56,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -64,7 +66,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -74,7 +76,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -84,7 +86,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -94,7 +96,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -108,7 +110,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -118,7 +120,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -130,7 +132,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -144,7 +146,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -158,7 +160,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -172,7 +174,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
@@ -186,7 +188,7 @@ main ()
;
}
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
if (c) /* { dg-message "note: beginning .parloops. part in OpenACC .kernels. region" } */
{
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-auto.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-auto.c
index 4f17204d199..c9a39eb54ef 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-auto.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-auto.c
@@ -13,124 +13,134 @@ main ()
int x, y, z;
#pragma acc kernels
-#pragma acc loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang /* { dg-optimized "assigned OpenACC gang loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto worker /* { dg-optimized "assigned OpenACC worker loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto vector /* { dg-optimized "assigned OpenACC vector loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang vector /* { dg-optimized "assigned OpenACC gang vector loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang worker /* { dg-optimized "assigned OpenACC gang worker loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto worker vector /* { dg-optimized "assigned OpenACC worker vector loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang worker vector /* { dg-optimized "assigned OpenACC gang worker vector loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto gang /* { dg-optimized "assigned OpenACC gang loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
+#pragma acc loop auto worker /* { dg-optimized "assigned OpenACC worker loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
+#pragma acc loop auto vector /* { dg-optimized "assigned OpenACC vector loop parallelism" } */
+ /* { dg-bogus ".auto. conflicts with other OpenACC loop specifiers" "" { xfail *-*-* } .-1 } */
for (z = 0; z < 10; z++)
;
#pragma acc kernels
-#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
;
#pragma acc kernels
-#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc kernels
-#pragma acc loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc kernels
-#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop
+#pragma acc loop /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc kernels
-#pragma acc loop auto
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop
+#pragma acc loop /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
#pragma acc kernels
-#pragma acc loop
- /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .parloops. for analysis" "" { target *-*-* } .-1 } */
+#pragma acc loop /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
+ /* { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto
+#pragma acc loop auto /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
-#pragma acc loop
+#pragma acc loop /* { dg-optimized "assigned OpenACC seq loop parallelism" } */
for (z = 0; z < 10; z++)
;
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-independent_seq.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-independent_seq.c
index bbdcf1636b1..f0ac62e5d55 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-independent_seq.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loop-independent_seq.c
@@ -2,7 +2,7 @@
constructs containing 'loop' constructs with 'independent' or 'seq'
clauses. */
-/* { dg-additional-options "-fopt-info-note-optimized-omp" } */
+/* { dg-additional-options "-fopt-info-optimized-omp" } */
//TODO update accordingly
/* See also "../../gfortran.dg/goacc/note-parallelism.f90". */
@@ -14,55 +14,46 @@ main ()
#pragma acc kernels
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent vector /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent gang vector /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent gang worker /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent worker vector /* { dg-message "optimized: assigned OpenACC worker vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent gang worker vector /* { dg-message "optimized: assigned OpenACC gang worker vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -72,13 +63,11 @@ main ()
#pragma acc kernels
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -86,7 +75,6 @@ main ()
#pragma acc kernels
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -96,7 +84,6 @@ main ()
#pragma acc kernels
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -106,7 +93,6 @@ main ()
#pragma acc kernels
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -116,7 +102,6 @@ main ()
#pragma acc kernels
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
for (y = 0; y < 10; y++)
@@ -124,15 +109,5 @@ main ()
for (z = 0; z < 10; z++)
;
-#pragma acc kernels
-#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- /* { dg-message "note: parallelized loop nest in OpenACC .kernels. region" "" { target *-*-* } .-1 } */
- for (x = 0; x < 10; x++)
-#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
- for (y = 0; y < 10; y++)
-#pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (z = 0; z < 10; z++)
- ;
-
return 0;
}
diff --git a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loops.c b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loops.c
index 92accdf27fa..30706a7e4a5 100644
--- a/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loops.c
+++ b/gcc/testsuite/c-c++-common/goacc/note-parallelism-kernels-loops.c
@@ -1,8 +1,9 @@
/* Test the output of "-fopt-info-optimized-omp" for an OpenACC 'kernels'
construct containing loops. */
-/* { dg-additional-options "-fno-openacc-kernels-annotate-loops" } */
-/* { dg-additional-options "-fopt-info-note-optimized-omp" } */
+/* { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
+ Normally, loop variables would get (implicit) 'private' clauses on the (implicit) 'loop' directives, but given '-fno-openacc-kernels-annotate-loops' they're (implicit) 'copy' -- which we then see get optimized. */
+/* { dg-additional-options "-fopt-info-optimized-note-omp" } */
//TODO update accordingly
/* See also "../../gfortran.dg/goacc/note-parallelism.f90". */
@@ -12,31 +13,31 @@ main ()
{
int x, y, z;
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. region in OpenACC .kernels. construct" } */
+#pragma acc kernels
+ for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
;
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. region in OpenACC .kernels. construct" } */
+#pragma acc kernels
+ for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
;
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. region in OpenACC .kernels. construct" } */
+#pragma acc kernels
+ for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
for (y = 0; y < 10; y++)
for (z = 0; z < 10; z++)
;
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. region in OpenACC .kernels. construct" } */
+#pragma acc kernels
+ for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
;
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. region in OpenACC .kernels. construct" } */
+#pragma acc kernels
+ for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
for (y = 0; y < 10; y++)
;
-#pragma acc kernels /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. region in OpenACC .kernels. construct" } */
+#pragma acc kernels
+ for (x = 0; x < 10; x++) /* { dg-message "note: beginning .Graphite. part in OpenACC .kernels. region" } */
for (y = 0; y < 10; y++)
for (z = 0; z < 10; z++)
;
diff --git a/gcc/testsuite/c-c++-common/goacc/routine-1.c b/gcc/testsuite/c-c++-common/goacc/routine-1.c
index 5b1d82bbc69..051f7937dee 100644
--- a/gcc/testsuite/c-c++-common/goacc/routine-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/routine-1.c
@@ -29,7 +29,7 @@ void seq (void)
int main ()
{
-#pragma acc kernels num_gangs (32) num_workers (32) vector_length (32) /* { dg-warning "region contains gang partitioned code but is not gang partitioned" } */
+#pragma acc kernels num_gangs (32) num_workers (32) vector_length (32)
{
gang ();
worker ();
diff --git a/gcc/testsuite/c-c++-common/goacc/routine-nohost-1.c b/gcc/testsuite/c-c++-common/goacc/routine-nohost-1.c
index 4f9a3a33357..ac5fdea657f 100644
--- a/gcc/testsuite/c-c++-common/goacc/routine-nohost-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/routine-nohost-1.c
@@ -1,6 +1,6 @@
/* Test OpenACC 'routine' with 'nohost' clause, valid use. */
-/* { dg-additional-options "-fdump-tree-oaccloops" } */
+/* { dg-additional-options "-fdump-tree-oaccloops3" } */
#pragma acc routine nohost
int THREE(void)
diff --git a/gcc/testsuite/c-c++-common/goacc/uninit-copy-clause.c b/gcc/testsuite/c-c++-common/goacc/uninit-copy-clause.c
index 628b84940a1..b3cc4459328 100644
--- a/gcc/testsuite/c-c++-common/goacc/uninit-copy-clause.c
+++ b/gcc/testsuite/c-c++-common/goacc/uninit-copy-clause.c
@@ -7,12 +7,6 @@ foo (void)
int i;
#pragma acc kernels
- /* { dg-warning "'i' is used uninitialized in this function" "" { target *-*-* } .-1 } */
- /*TODO With the 'copy' -> 'firstprivate' optimization, the original implicit 'copy(i)' clause gets optimized into a 'firstprivate(i)' clause -- and the expected (?) warning diagnostic appears.
- Have to read up the history behind these test cases.
- Should this test remain here in this file even if now testing 'firstprivate'?
- Or, should the optimization be disabled for such testing?
- Or, the testing be duplicated for both variants? */
{
i = 1;
}
diff --git a/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c b/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c
index 6979cce71b0..d2245a8f70c 100644
--- a/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c
+++ b/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-O2 -fdump-tree-oaccdevlow*" } */
+/* { dg-additional-options "-O2 -fdump-tree-oaccdevlow1" } */
extern int place ();
diff --git a/gcc/testsuite/gcc.dg/goacc/nested-function-1.c b/gcc/testsuite/gcc.dg/goacc/nested-function-1.c
index 2e48410b39d..639d961ec05 100644
--- a/gcc/testsuite/gcc.dg/goacc/nested-function-1.c
+++ b/gcc/testsuite/gcc.dg/goacc/nested-function-1.c
@@ -18,6 +18,8 @@
{ dg-message dummy {} { target iN-VAl-Id } l_dummy } to avoid
"WARNING: dg-line var l_dummy defined, but not used". */
+/* { dg-excess-errors ".*insufficient partitioning.*" } */
+
int main ()
{
#define N 100
@@ -59,7 +61,7 @@ int main ()
/* { dg-note {variable 'local_j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop$c_loop } */
for (local_j = 0; local_j < N; ++local_j)
;
-#pragma acc loop auto independent tile(1) /* { dg-line l_loop[incr c_loop] } */
+#pragma acc loop auto tile(1) /* { dg-line l_loop[incr c_loop] } */
/* { dg-note {variable 'local_j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop$c_loop } */
for (local_j = 0; local_j < N; ++local_j)
;
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
index 3f281a2379d..a132b47f27c 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
@@ -4,11 +4,10 @@
! { dg-additional-options "--param openacc-kernels=decompose" }
! { dg-additional-options "-O2" }
-! { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
-! { dg-additional-options "-fopt-info-all-omp" }
+! { dg-additional-options "-fopt-info-note-optimized-omp" }
! { dg-additional-options "-fdump-tree-ompexp" }
-! { dg-additional-options "-fdump-tree-parloops1-all" }
-! { dg-additional-options "-fdump-tree-oaccloops" }
+! { dg-additional-options "-fdump-tree-graphite-all-details" }
+! { dg-additional-options "-fdump-tree-oaccloops1-details" }
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
@@ -19,8 +18,7 @@ program main
integer, dimension (0:n-1) :: a, b, c
integer :: i
- ! An "external" mapping of loop iterations/array indices makes the loop
- ! unparallelizable.
+ ! A function call in a data-reference makes the loop unparallelizable
integer, external :: f
call setup(a, b)
@@ -28,23 +26,17 @@ program main
!$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1))
do i = 0, n - 1 ! { dg-line l_loop1 }
! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_loop1 }
- ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } l_loop1 }
+ ! { dg-note {beginning 'Graphite' part in OpenACC 'kernels' region} {} { target *-*-* } l_loop1 }
c(i) = a(f (i)) + b(f (i))
end do
!$acc end kernels
end program main
! Check the offloaded function's attributes.
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "ompexp" } }
-
-! Check that exactly one OpenACC kernels construct is analyzed, and that it
-! can't be parallelized.
-! { dg-final { scan-tree-dump-times "FAILED:" 1 "parloops1" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "parloops1" } }
-! { dg-final { scan-tree-dump-not "SUCCESS: may be parallelized" "parloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc parallel_kernels_graphite, omp target entrypoint, noclone\\)\\)" 1 "ompexp" } }
! Check the offloaded function's classification and compute dimensions (will
! always be 1 x 1 x 1 for non-offloading compilation).
-! { dg-final { scan-tree-dump-times "(?n)Function is unparallelized OpenACC kernels offload" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-not "^assigned OpenACC.*?loop parallelism$" "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc parallel_kernels_graphite, omp target entrypoint, noclone\\)\\)" 1 "oaccloops1" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95
index db3057af626..97486ba61d8 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95
@@ -4,11 +4,8 @@
! { dg-additional-options "--param openacc-kernels=decompose" }
! { dg-additional-options "-O2" }
-! { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
-! { dg-additional-options "-fopt-info-all-omp" }
-! { dg-additional-options "-fdump-tree-ompexp" }
-! { dg-additional-options "-fdump-tree-parloops1-all" }
-! { dg-additional-options "-fdump-tree-oaccloops" }
+! { dg-additional-options "-fopt-info-optimized" }
+! { dg-additional-options "-fdump-tree-oaccloops1" }
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
@@ -25,24 +22,15 @@ program main
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute1 } */
! { dg-note {variable 'i' made addressable} {} { target *-*-* } l_compute1 } */
do i = 0, n - 1 ! { dg-line l_loop1 }
- ! { dg-optimized {assigned OpenACC gang loop parallelism} {} { target *-*-* } l_loop1 }
+ ! { dg-optimized {assigned OpenACC gang vector loop parallelism} {} { target *-*-* } l_loop1 }
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } l_loop1 }
c(i) = a(i) + b(i)
end do
!$acc end kernels
end program main
-! Check the offloaded function's attributes.
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "ompexp" } }
-
-! Check that exactly one OpenACC kernels construct is analyzed, and that it
-! can be parallelized.
-! { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops1" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "parloops1" } }
-! { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } }
-
! Check the offloaded function's classification and compute dimensions (will
! always be 1 x 1 x 1 for non-offloading compilation).
-! { dg-final { scan-tree-dump-times "(?n)Function is parallelized OpenACC kernels offload" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Function is parallel_kernels_graphite OpenACC kernels offload" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc parallel_kernels_graphite, omp target entrypoint, noclone\\)\\)" 1 "oaccloops1" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-parallel.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-parallel.f95
index 8fa1e946e8c..dc35ac7a090 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-parallel.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-parallel.f95
@@ -30,6 +30,6 @@ end program main
! Check the offloaded function's classification and compute dimensions (will
! always be 1 x 1 x 1 for non-offloading compilation).
-! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC parallel offload" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc parallel, omp target entrypoint, noclone\\)\\)" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC parallel offload" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc parallel, omp target entrypoint, noclone\\)\\)" 1 "oaccloops1" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-routine.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-routine.f95
index e991783da1e..e5e74f81a70 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-routine.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-routine.f95
@@ -4,7 +4,7 @@
! { dg-additional-options "-O2" }
! { dg-additional-options "-fopt-info-optimized-omp" }
! { dg-additional-options "-fdump-tree-ompexp" }
-! { dg-additional-options "-fdump-tree-oaccloops" }
+! { dg-additional-options "-fdump-tree-oaccloops1" }
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
@@ -29,13 +29,13 @@ end subroutine ROUTINE
! Check the offloaded function's classification and compute dimensions (will
! always be 1 x 1 x 1 for non-offloading compilation).
-! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC routine level 1" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC routine level 1" 1 "oaccloops1" } }
! { dg-final { scan-tree-dump-times "(?n)OpenACC routine 'routine' doesn't have 'nohost' clause" 1 "oaccloops" { target { ! offloading_enabled } } } }
! { dg-final { scan-tree-dump-times "(?n)OpenACC routine 'routine_' doesn't have 'nohost' clause" 1 "oaccloops" { target offloading_enabled } } }
! { dg-final { scan-tree-dump-times "(?n)OpenACC routine 'routine' not discarded" 1 "oaccloops" { target { ! offloading_enabled } } } }
! { dg-final { scan-tree-dump-times "(?n)OpenACC routine 'routine_' not discarded" 1 "oaccloops" { target offloading_enabled } } }
-! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(0 1, 1 1, 1 1\\), omp declare target \\(worker\\)\\)\\)" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(0 1, 1 1, 1 1\\), omp declare target \\(worker\\)\\)\\)" 1 "oaccloops1" } }
! { dg-final { scan-tree-dump-times "(?n)void routine \\(\\)" 1 "oaccloops" { target { ! offloading_enabled } } } }
! { dg-final { scan-tree-dump-times "(?n)void routine_ \\(\\)" 1 "oaccloops" { target offloading_enabled } } }
!TODO See PR101551 for 'offloading_enabled' differences.
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95
index 996b2ae2270..425a41768b8 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95
@@ -4,7 +4,7 @@
! { dg-additional-options "-O2" }
! { dg-additional-options "-fopt-info-optimized-omp" }
! { dg-additional-options "-fdump-tree-ompexp" }
-! { dg-additional-options "-fdump-tree-oaccloops" }
+! { dg-additional-options "-fdump-tree-oaccloops1" }
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
@@ -18,9 +18,6 @@ program main
call setup(a, b)
!$acc serial loop copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) ! { dg-line l_compute_loop_i1 }
- ! { dg-bogus "\[Ww\]arning: region contains gang partitioned code but is not gang partitioned" "TODO 'serial'" { xfail *-*-* } l_compute_loop_i1 }
- ! { dg-bogus "\[Ww\]arning: region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } l_compute_loop_i1 }
- ! { dg-bogus "\[Ww\]arning: region contains vector partitioned code but is not vector partitioned" "TODO 'serial'" { xfail *-*-* } l_compute_loop_i1 }
! { dg-optimized {assigned OpenACC gang vector loop parallelism} {} { target *-*-* } l_compute_loop_i1 }
do i = 0, n - 1
c(i) = a(i) + b(i)
@@ -33,6 +30,6 @@ end program main
! Check the offloaded function's classification and compute dimensions (will
! always be 1 x 1 x 1 for non-offloading compilation).
-! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint, noclone\\)\\)" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint, noclone\\)\\)" 1 "oaccloops1" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 b/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90
index 0c151547e32..9aba4825137 100644
--- a/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90
@@ -42,9 +42,9 @@ program main
!$acc end kernels
end program main
-! { dg-final { scan-tree-dump-times "omp target oacc_parallel .*map\\(tofrom:a \\\[len: 400\\\]\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_parallel .*map\\(tofrom:a \\\[len: 400\\\]\\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_parallel .*map\\(tofrom:b \\\[len: 400\\\]\\\)" 1 "omplower" } }
-! { dg-final { scan-tree-dump-times "omp target oacc_parallel .*map\\(tofrom:c \\\[len: 4\\\]\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_parallel .*map\\(tofrom:c \\\[len: 4\\\]\\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_data_kernels .*map\\(force_tofrom:i \\\[len: 4\\\]\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_present:i \\\[len: 4\\\]\\)" 1 "omplower" } }
@@ -54,6 +54,10 @@ end program main
! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_present:y \\\[len: 400\\\]\\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_data_kernels .*map\\(force_tofrom:c \\\[len: 4\\\]\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_present:c \\\[len: 4\\\]\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_parallel_kernels_graphite .*map\\(force_present:x \\\[len: 400\\\]\\\[implicit\\\]\\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_parallel_kernels_graphite .*map\\(force_present:y \\\[len: 400\\\]\\\[implicit\\\]\\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_parallel_kernels_graphite .*private\\(i\\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_parallel_kernels_graphite .*map\\(force_tofrom:c \\\[len: 4\\\]\\\[implicit\\\]\\\)" 1 "omplower" } }
! Expecting no mapping of un-referenced common-blocks variables
diff --git a/gcc/testsuite/gfortran.dg/goacc/gang-static.f95 b/gcc/testsuite/gfortran.dg/goacc/gang-static.f95
index cc83c7dd65b..37c3222d408 100644
--- a/gcc/testsuite/gfortran.dg/goacc/gang-static.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/gang-static.f95
@@ -17,7 +17,7 @@ program main
call test (a, b, 0, n)
- !$acc parallel loop gang (static:1) num_gangs (10)
+ !$acc parallel loop gang (static:1) num_gangs (11)
do i = 1, n
a(i) = b(i) + 1
end do
@@ -25,7 +25,7 @@ program main
call test (a, b, 1, n)
- !$acc parallel loop gang (static:2) num_gangs (10)
+ !$acc parallel loop gang (static:2) num_gangs (12)
do i = 1, n
a(i) = b(i) + 2
end do
@@ -33,7 +33,7 @@ program main
call test (a, b, 2, n)
- !$acc parallel loop gang (static:5) num_gangs (10)
+ !$acc parallel loop gang (static:5) num_gangs (13)
do i = 1, n
a(i) = b(i) + 5
end do
@@ -41,7 +41,7 @@ program main
call test (a, b, 5, n)
- !$acc parallel loop gang (static:20) num_gangs (10)
+ !$acc parallel loop gang (static:20) num_gangs (14)
do i = 1, n
a(i) = b(i) + 20
end do
@@ -73,10 +73,8 @@ subroutine test (a, b, sarg, n)
end do
end subroutine test
-! { dg-final { scan-tree-dump-times "gang\\(static:\\\*\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "gang\\(static:1\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "gang\\(static:2\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "gang\\(static:5\\)" 1 "omplower" } }
-! { dg-final { scan-tree-dump-times "gang\\(static:20\\)" 1 "omplower" } }
-! { dg-final { scan-tree-dump-times "gang\\(num: 5 static:\\\*\\)" 1 "omplower" } }
-! { dg-final { scan-tree-dump-times "gang\\(num: 30 static:20\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "gang\\(static:20\\)" 2 "omplower" } }
+! { dg-final { scan-tree-dump-times "gang\\(static:\\\*\\)" 2 "omplower" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95
index 1a26844f96d..a70f5efdd6b 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95
@@ -1,105 +1,161 @@
! Test OpenACC 'kernels' construct decomposition.
-! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-fopt-info-optimized-note-omp" }
+! { dg-additional-options "-O2" } for "Graphite".
+! { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose-details -fdump-tree-gimple-details" }
+! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
+! aspects of that functionality.
-! { dg-additional-options "-fdump-tree-gimple" }
+program main
+ implicit none
-! { dg-additional-options "--param=openacc-kernels=decompose" }
-! { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" }
+ integer, external :: f_g
+ !$acc routine (f_g) gang
+ integer, external :: f_w
+ !$acc routine (f_w) worker
+ integer, external :: f_v
+ !$acc routine (f_v) vector
+ integer, external :: f_s
+ !$acc routine (f_s) seq
+
+ integer :: i, j, k
+ integer :: x, y, z
+ logical :: y_l
+ integer, parameter :: N = 10
+ integer :: a(N), b(N), c(N)
+ integer :: sum
+
+ !$acc kernels
+ ! { dg-optimized {'map\(force_tofrom:x \[len: [0-9]+\]\[implicit\]\)' optimized to 'map\(to:x \[len: [0-9]+\]\[implicit\]\)'} "" { target *-*-* } .-1 }
+ ! { dg-optimized {'map\(to:x \[len: [0-9]+\]\[implicit\]\)' further optimized to 'private\(x\)'} "" { target *-*-* } .-2 }
+ ! { dg-optimized {'map\(force_tofrom:y_l \[len: [0-9]+\]\[implicit\]\)' optimized to 'map\(to:y_l \[len: [0-9]+\]\[implicit\]\)'} "" { target *-*-* } .-3 }
+ ! { dg-optimized {'map\(to:y_l \[len: [0-9]+\]\[implicit\]\)' further optimized to 'private\(y_l\)'} "" { target *-*-* } .-4 }
+ x = 0
+ y = 0
+ y_l = x < 10
+ z = x
+ x = x + 1
+ ;
+ !$acc end kernels
-! { dg-additional-options "--param=openacc-privatization=noisy" }
-! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
-! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} }
+ !$acc kernels
+ do i = 1, N ! { dg-optimized "assigned OpenACC gang vector loop parallelism" }
+ a(i) = 0
+ end do
+ !$acc end kernels
-! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
-! aspects of that functionality.
+ !$acc kernels loop
+ ! { dg-bogus "assigned OpenACC seq loop parallelism" "TODO-kernels Graphite cannot represent access function" { xfail *-*-* } .-1 }
+ ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "TODO-kernels Graphite cannot represent access function " { xfail *-*-* } .-2 }
+ ! { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-3 }
+ do i = 1, N
+ b(i) = a(N - i + 1)
+ end do
-! See also '../../c-c++-common/goacc/kernels-decompose-1.c'.
+ !$acc kernels ! { dg-optimized {.map\(force_tofrom:sum \[len: [0-9]+\]\[implicit\]\). optimized to .map\(to:sum \[len: [0-9]+\]\[implicit\]\).} }
+ !$acc loop
+ ! { dg-bogus "assigned OpenACC seq loop parallelism" "TODO-kernels Graphite cannot represent access function" { xfail *-*-* } .-1 }
+ ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "TODO-kernels Graphite cannot represent access function " { xfail *-*-* } .-2 }
+ ! { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-3 }
+ do i = 1, N
+ b(i) = a(N - i + 1)
+ end do
+
+ !$acc loop
+ ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "TODO-kernels Graphite cannot represent access function " { target *-*-* } .-1 }
+ ! { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-2 }
+ do i = 1, N
+ c(i) = a(i) * b(i)
+ end do
-! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
-! passed to 'incr' may be unset, and in that case, it will be set to [...]",
-! so to maintain compatibility with earlier Tcl releases, we manually
-! initialize counter variables:
-! { dg-line l_dummy[variable c_compute 0 c_loop_i 0] }
-! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
-! "WARNING: dg-line var l_dummy defined, but not used".
+ a(z) = 0
-program main
- implicit none
- integer, parameter :: N = 1024
- integer, dimension (1:N) :: a
- integer :: i, sum
-
- !$acc kernels copyin(a(1:N)) copy(sum) ! { dg-line l_compute[incr c_compute] }
- ! { dg-note {variable 'sum\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-bogus "optimized: assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } l_compute$c_compute }
- !TODO Is this maybe the report that belongs to the XFAILed report further down? */
-
- !$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
+ !$acc loop
+ ! { dg-bogus "assigned OpenACC seq loop parallelism" "TODO-kernels missing synth reductions" { xfail *-*-* } .-1 }
+ ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "TODO-kernels missing synth reductions" { xfail *-*-* } .-2 }
+ ! { dg-message "note: forwarded loop nest in OpenACC .kernels. region to .Graphite. for analysis" "" { target *-*-* } .-3 }
do i = 1, N
sum = sum + a(i)
end do
- ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
- sum = sum + 1
- a(1) = a(1) + 1
+ !$acc loop seq ! { dg-optimized "assigned OpenACC seq loop parallelism" }
+ do i = 1 + 1, N
+ c(i) = c(i) + c(i - 1)
+ end do
+ !$acc end kernels
- !$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
+ !$acc kernels
+ !$acc loop independent ! { dg-optimized "assigned OpenACC gang loop parallelism" }
do i = 1, N
- sum = sum + a(i)
+ !$acc loop independent ! { dg-optimized "assigned OpenACC worker loop parallelism" }
+ do j = 1, N
+ !$acc loop independent ! { dg-optimized "assigned OpenACC seq loop parallelism" }
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ ! { dg-bogus "optimized: assigned OpenACC vector loop parallelism" "" { target *-*-* } .-2 }
+ do k = 1, N
+ a(1 + mod(i + j + k, N)) &
+ = b(j) &
+ + f_v (c(k)) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
+ end do
+ end do
end do
- ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
- if (sum .gt. 10) then
- !$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- !TODO { dg-optimized "assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } l_loop_i$c_loop_i }
- do i = 1, N
- sum = sum + a(i)
- end do
+ if (y < 5) then
+ !$acc loop independent ! { dg-optimized "assigned OpenACC gang loop parallelism" }
+ do j = 1, N
+ b(j) = f_w (c(j)) ! { dg-optimized "assigned OpenACC worker vector loop parallelism" }
+ end do
end if
+ !$acc end kernels
- !$acc loop auto ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
- do i = 1, N
- sum = sum + a(i)
+ !$acc kernels
+ y = f_g (a(5)) ! { dg-optimized "assigned OpenACC gang worker vector loop parallelism" }
+
+ !$acc loop independent ! { dg-optimized "assigned OpenACC gang loop parallelism" }
+ ! { dg-bogus "optimized: assigned OpenACC gang vector loop parallelism" "" { target *-*-* } .-1 }
+ do j = 1, N
+ b(j) = y + f_w (c(j)) ! { dg-optimized "assigned OpenACC worker vector loop parallelism" }
end do
+ !$acc end kernels
+ !$acc kernels
+ ! { dg-optimized {.map\(force_tofrom:z \[len: [0-9]+\]\[implicit\]\). optimized to .map\(to:z \[len: [0-9]+\]\[implicit\]\).} "" { target *-*-* } .-1 }
+ ! { dg-optimized {.map\(to:z \[len: [0-9]+\]\[implicit\]\). further optimized to .private\(z\).} "" { target *-*-* } .-2 }
+ ! { dg-optimized {.map\(force_tofrom:y \[len: [0-9]+\]\[implicit\]\). optimized to .map\(to:y \[len: [0-9]+\]\[implicit\]\).} "" { target *-*-* } .-3 }
+ ! { dg-optimized {.map\(to:y \[len: [0-9]+\]\[implicit\]\). further optimized to .private\(y\).} "" { target *-*-* } .-4 }
+ y = 3
+
+ !$acc loop independent ! { dg-optimized "assigned OpenACC gang worker loop parallelism" }
+ ! { dg-bogus "optimized: assigned OpenACC gang vector loop parallelism" "" { target *-*-* } .-1 }
+ do j = 1, N
+ b(j) = y + f_v (c(j)) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
+ end do
+
+ z = 2
!$acc end kernels
-end program main
-! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_kernels map\(to:a\[_[0-9]+\] \[len: _[0-9]+\]\) map\(alloc:a \[pointer assign, bias: _[0-9]+\]\) map\(tofrom:sum \[len: [0-9]+\]\)$} 1 "gimple" } }
+ !$acc kernels
+ !$acc end kernels
+end program main
-! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\)$} 2 "gimple" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\)$} 4 "gimple" } }
! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\) independent$} 1 "gimple" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\) auto$} 1 "gimple" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop} 4 "gimple" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop auto private\(i\)$} 1 "gimple" } }
! Check that the OpenACC 'kernels' got decomposed into 'data' and an enclosed
! sequence of compute constructs.
-! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_data_kernels map\(to:a\[_[0-9]+\] \[len: _[0-9]+\]\) map\(tofrom:sum \[len: [0-9]+\]\)$} 1 "omp_oacc_kernels_decompose" } }
-! As noted above, we get three "old-style" kernel regions, one gang-single region, and one parallelized loop region.
-! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_kernels async\(-1\) map\(force_present:a\[_[0-9]+\] \[len: _[0-9]+\]\) map\(alloc:a \[pointer assign, bias: _[0-9]+\]\) map\(force_present:sum \[len: [0-9]+\]\)$} 3 "omp_oacc_kernels_decompose" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_parallelized async\(-1\) map\(force_present:a\[_[0-9]+\] \[len: _[0-9]+\]\) map\(alloc:a \[pointer assign, bias: _[0-9]+\]\) map\(force_present:sum \[len: [0-9]+\]\)$} 1 "omp_oacc_kernels_decompose" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_gang_single async\(-1\) num_gangs\(1\) map\(force_present:a\[_[0-9]+\] \[len: _[0-9]+\]\) map\(alloc:a \[pointer assign, bias: _[0-9]+\]\) map\(force_present:sum \[len: [0-9]+\]\)$} 1 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_data_kernels} 8 "omp_oacc_kernels_decompose" } }
!
! 'data' plus five CCs.
-! { dg-final { scan-tree-dump-times {(?n)#pragma omp target } 6 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_graphite async\(-1\)} 6 "omp_oacc_kernels_decompose" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\)$} 2 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop auto private\(i\)$} 5 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\) seq$} 1 "omp_oacc_kernels_decompose" } }
! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\) independent$} 1 "omp_oacc_kernels_decompose" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(i\) auto} 1 "omp_oacc_kernels_decompose" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop} 4 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(j\) independent$} 4 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop private\(k\) independent$} 1 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma acc loop} 12 "omp_oacc_kernels_decompose" } }
! Each of the parallel regions is async, and there is a final call to
! __builtin_GOACC_wait.
-! { dg-final { scan-tree-dump-times "__builtin_GOACC_wait" 1 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOACC_wait" 4 "omp_oacc_kernels_decompose" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
index 698de120385..91962440e6e 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
@@ -1,10 +1,10 @@
! Test OpenACC 'kernels' construct decomposition.
-! { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
+! { dg-additional-options "-fopenacc-kernels-annotate-loops" }
! { dg-additional-options "-fopt-info-omp-all" }
! { dg-additional-options "--param=openacc-kernels=decompose" }
-! { dg-additional-options "-O2" } for 'parloops'.
+! { dg-additional-options "-O2" } for 'Graphite'.
! { dg-additional-options "--param=openacc-privatization=noisy" }
! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
@@ -41,74 +41,76 @@ program main
integer, parameter :: N = 10
integer :: a(N), b(N), c(N)
- !$acc kernels ! { dg-line l_compute[incr c_compute] }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'z' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'z' made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'y_l' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'y_l' made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'y' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'y' made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'x' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'x' made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ !$acc kernels ! { dg-line l_kernels[incr region] }
+ ! { dg-missed {.map\(force_tofrom:y \[len: [0-9]+\]\[implicit\]\). not optimized: .y. used} "" { target *-*-* } l_kernels$region }
+ ! { dg-optimized {.map\(force_tofrom:y_l \[len: [0-9]+\]\[implicit\]\). optimized to .map\(to:y_l \[len: [0-9]+\]\[implicit\]\).} "" { target *-*-* } l_kernels$region }
+ ! { dg-optimized {.map\(to:y_l \[len: [0-9]+\]\[implicit\]\). further optimized to .private\(y_l\).} "" { target *-*-* } l_kernels$region }
+ ! { dg-optimized {.map\(force_tofrom:x \[len: [0-9]+\]\[implicit\]\). optimized to .map\(to:x \[len: [0-9]+\]\[implicit\]\).} "" { target *-*-* } l_kernels$region }
+ ! { dg-optimized {.map\(to:x \[len: [0-9]+\]\[implicit\]\). further optimized to .private\(x\).} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {.map\(force_tofrom:z \[len: [0-9]+\]\[implicit\]\). not optimized: .z. used} "" { target *-*-* } l_kernels$region }
x = 0
y = 0
y_l = x < 10
z = x
x = x + 1
+
;
!$acc end kernels
- !$acc kernels ! { dg-line l_compute[incr c_compute] }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'i' made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-optimized {assigned OpenACC gang loop parallelism} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
- do i = 1, N
+ !$acc kernels ! { dg-line l_kernels[incr region] }
+ ! { dg-missed {'map\(tofrom:a \[len: [0-9]+\]\[implicit\]\)' not optimized: 'a' is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+ do i = 1, N ! { dg-line l_loop_i[incr c_loop_i] }
+ ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'Graphite' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
a(i) = 0
end do
!$acc end kernels
!$acc kernels loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-missed {.map\(tofrom:b \[len: [0-9]+\]\[implicit\]\). not optimized: .b. is unsuitable for privatization} "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-missed {.map\(tofrom:a \[len: [0-9]+\]\[implicit\]\). not optimized: .a. is unsuitable for privatization} "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'Graphite' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-optimized "assigned OpenACC gang loop parallelism" "TODO Graphite cannot represent access function" { xfail *-*-* } l_loop_i$c_loop_i }
+ ! { dg-bogus "assigned OpenACC seq loop parallelism" "TODO Graphite cannot represent access function" { xfail *-*-* } l_loop_i$c_loop_i }
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_i$c_loop_i }
do i = 1, N
b(i) = a(N - i + 1)
end do
- !$acc kernels ! { dg-line l_compute[incr c_compute] }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'z' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'z' already made addressable} {} { target *-*-* } l_compute$c_compute }
+ !$acc kernels ! { dg-line l_kernels[incr region] }
+ ! { dg-missed {.map\(force_tofrom:z \[len: [0-9]+\]\[implicit\]\). not optimized: .z. used} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {\.\.\. here} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {.map\(tofrom:c \[len: [0-9]+\]\[implicit\]\). not optimized: .c. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {.map\(tofrom:b \[len: [0-9]+\]\[implicit\]\). not optimized: .b. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {.map\(tofrom:a \[len: [0-9]+\]\[implicit\]\). not optimized: .a. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'Graphite' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-optimized "assigned OpenACC gang loop parallelism" "" { xfail *-*-* } l_loop_i$c_loop_i }
+ ! { dg-bogus "assigned OpenACC seq loop parallelism" "TODO Graphite cannot represent access function" { xfail *-*-* } l_loop_i$c_loop_i }
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_i$c_loop_i }
do i = 1, N
b(i) = a(N - i + 1)
end do
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'Graphite' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
c(i) = a(i) * b(i)
end do
- ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
a(z) = 0
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'Graphite' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
c(i) = c(i) + a(i)
end do
!$acc loop seq ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1 + 1, N
@@ -116,24 +118,30 @@ program main
end do
!$acc end kernels
- !$acc kernels ! { dg-line l_compute[incr c_compute] }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'y' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'y' already made addressable} {} { target *-*-* } l_compute$c_compute }
- !TODO What does this mean?
- !TODO { dg-optimized "assigned OpenACC worker vector loop parallelism" "" { target *-*-* } l_compute$c_compute }
+ !$acc kernels ! { dg-line l_kernels[incr region] }
+ ! { dg-missed {.map\(force_tofrom:y \[len: [0-9]+\]\[implicit\]\). not optimized: .y. used} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {\.\.\. here} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {.map\(tofrom:c \[len: [0-9]+\]\[implicit\]\). not optimized: .c. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {.map\(tofrom:b \[len: [0-9]+\]\[implicit\]\). not optimized: .b. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {.map\(tofrom:a \[len: [0-9]+\]\[implicit\]\). not optimized: .a. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+
!$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
- ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-bogus "missed: .independent. loop in .kernels. region has not been analyzed .cf. .graphite. dumps for more information.." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_i$c_loop_i }
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_i$c_loop_i }
do i = 1, N
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
! { dg-optimized "assigned OpenACC worker loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
+ ! { dg-bogus "missed: .independent. loop in .kernels. region has not been analyzed .cf. .graphite. dumps for more information.." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
do j = 1, N
!$acc loop independent ! { dg-line l_loop_k[incr c_loop_k] }
! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } l_loop_k$c_loop_k }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_k$c_loop_k }
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_k$c_loop_k }
+ ! { dg-bogus "missed: .independent. loop in .kernels. region has not been analyzed .cf. .graphite. dumps for more information.." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_k$c_loop_k }
do k = 1, N
a(1 + mod(i + j + k, N)) &
= b(j) &
@@ -142,58 +150,58 @@ program main
end do
end do
- !TODO Should the following turn into "gang-single" instead of "parloops"?
- !TODO The problem is that the first STMT is 'if (y <= 4) goto <D.2547>; else goto <D.2548>;', thus "parloops".
- ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
- if (y < 5) then
+ if (y < 5) then ! { dg-message "note: beginning 'Graphite' part in OpenACC 'kernels' region" }
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
- ! { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_j$c_loop_j }
- ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_j$c_loop_j } ! TODO-kernels Clarify: should this be unparallelized or should the warning go away?
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
+ ! { dg-bogus "missed: .independent. loop in .kernels. region has not been analyzed .cf. .graphite. dumps for more information.." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
+ ! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j }
do j = 1, N
- b(j) = f_w (c(j))
+ b(j) = f_w (c(j)) ! { dg-optimized "assigned OpenACC worker vector loop parallelism" }
end do
end if
!$acc end kernels
- !$acc kernels ! { dg-line l_compute[incr c_compute] }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'y' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'y' already made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-bogus "\[Ww\]arning: region contains gang partitioned code but is not gang partitioned" "TODO 'kernels'" { xfail *-*-* } l_compute$c_compute }
+ !$acc kernels ! { dg-line l_kernels[incr region] }
+ ! { dg-missed {'map\(force_tofrom:y \[len: [0-9]+\]\[implicit\]\)' not optimized: 'y' used} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {'map\(tofrom:c \[len: [0-9]+\]\[implicit\]\)' not optimized: 'c' is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {'map\(tofrom:b \[len: [0-9]+\]\[implicit\]\)' not optimized: 'b' is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+ ! { dg-missed {'map\(tofrom:a \[len: [0-9]+\]\[implicit\]\)' not optimized: 'a' is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
y = f_g (a(5)) ! { dg-line l_part[incr c_part] }
- !TODO If such a construct is placed in its own part (like it is, here), can't this actually use gang paralelism, instead of "gang-single"?
- ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } l_part$c_part }
! { dg-optimized "assigned OpenACC gang worker vector loop parallelism" "" { target *-*-* } l_part$c_part }
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
- ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_j$c_loop_j }
- ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
+ ! { dg-bogus "missed: .independent. loop in .kernels. region has not been analyzed .cf. .graphite. dumps for more information.." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
do j = 1, N
b(j) = y + f_w (c(j)) ! { dg-optimized "assigned OpenACC worker vector loop parallelism" }
end do
!$acc end kernels
- !$acc kernels ! { dg-line l_compute[incr c_compute] }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'z' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'z' already made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {OpenACC 'kernels' decomposition: variable 'y' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'y' already made addressable} {} { target *-*-* } l_compute$c_compute }
- ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ !$acc kernels ! { dg-line l_kernels[incr region] }
+! { dg-optimized {.map\(force_tofrom:z \[len: [0-9]+\]\[implicit\]\). optimized to .map\(to:z \[len: [0-9]+\]\[implicit\]\).} "" { target *-*-* } l_kernels$region }
+! { dg-optimized {.map\(to:z \[len: [0-9]+\]\[implicit\]\). further optimized to .private\(z\).} "" { target *-*-* } l_kernels$region }
+! { dg-optimized {.map\(force_tofrom:y \[len: [0-9]+\]\[implicit\]\). optimized to .map\(to:y \[len: [0-9]+\]\[implicit\]\).} "" { target *-*-* } l_kernels$region }
+! { dg-optimized {.map\(to:y \[len: [0-9]+\]\[implicit\]\). further optimized to .private\(y\).} "" { target *-*-* } l_kernels$region }
+! { dg-missed {\.\.\. here} "" { target *-*-* } l_kernels$region }
+! { dg-missed {.map\(tofrom:c \[len: [0-9]+\]\[implicit\]\). not optimized: .c. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+! { dg-missed {.map\(tofrom:b \[len: [0-9]+\]\[implicit\]\). not optimized: .b. is unsuitable for privatization} "" { target *-*-* } l_kernels$region }
+! { dg-missed {\.\.\. here} "" { target *-*-* } l_kernels[expr {$region - 1}] }
+
y = 3
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
- ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_j$c_loop_j }
- ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
! { dg-optimized "assigned OpenACC gang worker loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-bogus "missed: .auto. loop has not been analyzed .cf. .graphite. dumps for more information." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
+ ! { dg-bogus "missed: .independent. loop in .kernels. region has not been analyzed .cf. .graphite. dumps for more information.." "TODO Inexact representation of access function in Graphite" { xfail *-*-* } l_loop_j$c_loop_j }
do j = 1, N
b(j) = y + f_v (c(j)) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
end do
- ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
z = 2
!$acc end kernels
- ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
!$acc kernels
!$acc end kernels
end program main
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-loop-2.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-loop-2.f95
index c7252697a7e..40ba4b6f1e7 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-loop-2.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-loop-2.f95
@@ -1,8 +1,7 @@
-! { dg-additional-options "--param=openacc-kernels=parloops" } as this is
-! specifically testing "parloops" handling.
+! { dg-additional-options "--param openacc-kernels=decompose" } as this is
+! specifically testing "Graphite" handling.
! { dg-additional-options "-O2" }
-! { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
-! { dg-additional-options "-fdump-tree-parloops1-all" }
+! { dg-additional-options "-fdump-tree-graphite-details" }
! { dg-additional-options "-fdump-tree-optimized" }
program main
@@ -35,10 +34,9 @@ program main
end program main
-! Check that only three loops are analyzed, and that all can be parallelized.
-! { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 3 "parloops1" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 3 "parloops1" } }
-! { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } }
+! { dg-final { scan-tree-dump-times "loop has no data-dependences" 6 "graphite" } } ! Two CFG loops per OpenACC loop
+! { dg-final { scan-tree-dump-not "loop has data-dependences" "graphite" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(, , \\), oacc parallel_kernels_graphite, omp target entrypoint, noclone\\)\\)" 3 "graphite" } }
! Check that the loop has been split off into a function.
! { dg-final { scan-tree-dump-times "(?n);; Function MAIN__._omp_fn.0 " 1 "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-loop-data-2.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-loop-data-2.f95
index 714e8641abc..29add3d5569 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-loop-data-2.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-loop-data-2.f95
@@ -1,8 +1,7 @@
-! { dg-additional-options "--param=openacc-kernels=parloops" } as this is
-! specifically testing "parloops" handling.
+! { dg-additional-options "--param=openacc-kernels=decompose" } as this is
+! specifically testing "Graphite" handling.
! { dg-additional-options "-O2" }
-! { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
-! { dg-additional-options "-fdump-tree-parloops1-all" }
+! { dg-additional-options "-fdump-tree-graphite-details" }
! { dg-additional-options "-fdump-tree-optimized" }
program main
@@ -42,9 +41,8 @@ program main
end program main
! Check that only three loops are analyzed, and that all can be parallelized.
-! { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 3 "parloops1" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 3 "parloops1" } }
-! { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(, , \\), oacc parallel_kernels_graphite, omp target entrypoint, noclone\\)\\)" 3 "graphite" } }
+! { dg-final { scan-tree-dump-times "loop has no data-dependences" 6 "graphite" } } ! Two CFG loops per OpenACC loop
! Check that the loop has been split off into a function.
! { dg-final { scan-tree-dump-times "(?n);; Function MAIN__._omp_fn.0 " 1 "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-loop-inner.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-loop-inner.f95
index 23e64d29ab3..0c26c9897c0 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-loop-inner.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-loop-inner.f95
@@ -1,4 +1,4 @@
-! { dg-additional-options "--param=openacc-kernels=parloops" } as this is
+! { dg-additional-options "--param openacc-kernels=decompose-parloops" } as this is
! specifically testing "parloops" handling.
! { dg-additional-options "-O2" }
! { dg-additional-options "-fopt-info-optimized-omp" }
@@ -9,8 +9,8 @@ program main
integer :: a(100,100), b(100,100)
integer :: i, j, d
- !$acc kernels ! { dg-message "optimized: assigned OpenACC gang loop parallelism" }
- do i=1,100
+ !$acc kernels
+ do i=1,10 ! { dg-message "optimized: assigned OpenACC seq loop parallelism" }0
do j=1,100
a(i,j) = 1
b(i,j) = 2
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-loop.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-loop.f95
index 7e1c7cb863c..48e17d6ebe3 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-loop.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-loop.f95
@@ -1,8 +1,7 @@
-! { dg-additional-options "--param=openacc-kernels=parloops" } as this is
-! specifically testing "parloops" handling.
+! { dg-additional-options "--param openacc-kernels=decompose" } as this is
+! specifically testing "Graphite" handling.
! { dg-additional-options "-O2" }
-! { dg-additional-options "-fno-openacc-kernels-annotate-loops" }
-! { dg-additional-options "-fdump-tree-parloops1-all" }
+! { dg-additional-options "-fdump-tree-graphite-details" }
! { dg-additional-options "-fdump-tree-optimized" }
program main
@@ -32,9 +31,8 @@ program main
end program main
! Check that only one loop is analyzed, and that it can be parallelized.
-! { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops1" } }
-! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 "parloops1" } }
-! { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(, , \\), oacc parallel_kernels_graphite, omp target entrypoint, noclone\\)\\)" 1 "graphite" } }
+! { dg-final { scan-tree-dump-times "loop has no data-dependences" 2 "graphite" } } ! Two CFG loops per OpenACC loop
! Check that the loop has been split off into a function.
! { dg-final { scan-tree-dump-times "(?n);; Function MAIN__._omp_fn.0 " 1 "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95
index ceb07fbb9e9..45eb9dcab03 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95
@@ -42,4 +42,4 @@ end program test
! { dg-final { scan-tree-dump-times "map\\(force_deviceptr:u\\)" 1 "original" } }
! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_data_kernels if\((?:D\.|_)[0-9]+\)$} 1 "omp_oacc_kernels_decompose" } }
-! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_gang_single num_gangs\(1\) if\((?:D\.|_)[0-9]+\) async\(-1\)$} 1 "omp_oacc_kernels_decompose" } }
+! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_graphite if\((?:D\.|_)[0-9]+\) async\(-1\)$} 1 "omp_oacc_kernels_decompose" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/loop-2-kernels.f95 b/gcc/testsuite/gfortran.dg/goacc/loop-2-kernels.f95
index a4cf11c806f..853a4b22e21 100644
--- a/gcc/testsuite/gfortran.dg/goacc/loop-2-kernels.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/loop-2-kernels.f95
@@ -35,7 +35,7 @@ program test
DO j = 1,10
ENDDO
ENDDO
- !$acc loop seq gang ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc loop seq gang ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
@@ -56,11 +56,11 @@ program test
!$acc loop worker ! { dg-error "inner loop uses same OpenACC parallelism as containing loop" }
DO j = 1,10
ENDDO
- !$acc loop gang ! { dg-error "" "TODO" { xfail *-*-* } }
+ !$acc loop gang ! { dg-error "" }
DO j = 1,10
ENDDO
ENDDO
- !$acc loop seq worker ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc loop seq worker ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
!$acc loop gang worker
@@ -81,14 +81,14 @@ program test
!$acc loop vector ! { dg-error "inner loop uses same OpenACC parallelism as containing loop" }
DO j = 1,10
ENDDO
- !$acc loop worker ! { dg-error "" "TODO" { xfail *-*-* } }
+ !$acc loop worker ! { dg-error "" }
DO j = 1,10
ENDDO
- !$acc loop gang ! { dg-error "" "TODO" { xfail *-*-* } }
+ !$acc loop gang ! { dg-error "" }
DO j = 1,10
ENDDO
ENDDO
- !$acc loop seq vector ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc loop seq vector ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
!$acc loop gang vector
@@ -101,7 +101,7 @@ program test
!$acc loop auto
DO i = 1,10
ENDDO
- !$acc loop seq auto ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc loop seq auto ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
!$acc loop gang auto ! { dg-error "'auto' conflicts with other OpenACC loop specifiers" }
@@ -133,7 +133,7 @@ program test
!$acc kernels loop gang(static:*)
DO i = 1,10
ENDDO
- !$acc kernels loop seq gang ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc kernels loop seq gang ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
@@ -146,7 +146,7 @@ program test
!$acc kernels loop worker(num:5)
DO i = 1,10
ENDDO
- !$acc kernels loop seq worker ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc kernels loop seq worker ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
!$acc kernels loop gang worker
@@ -162,7 +162,7 @@ program test
!$acc kernels loop vector(length:5)
DO i = 1,10
ENDDO
- !$acc kernels loop seq vector ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc kernels loop seq vector ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
!$acc kernels loop gang vector
@@ -175,7 +175,7 @@ program test
!$acc kernels loop auto
DO i = 1,10
ENDDO
- !$acc kernels loop seq auto ! { dg-error "'seq' overrides other OpenACC loop specifiers" "TODO" { xfail *-*-* } }
+ !$acc kernels loop seq auto ! { dg-error "'seq' overrides other OpenACC loop specifiers" }
DO i = 1,10
ENDDO
!$acc kernels loop gang auto ! { dg-error "'auto' conflicts with other OpenACC loop specifiers" }
diff --git a/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-2.f90 b/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-2.f90
index bba67dcf7cb..a9e75f2da7d 100644
--- a/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-2.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-2.f90
@@ -23,7 +23,6 @@ subroutine test_loop_nest_depth_1 ()
!$acc parallel loop auto copy(array1, array2) ! { dg-message "assigned OpenACC gang vector loop parallelism" }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-1 }
- ! { dg-message ".auto. loop can be parallel" "" {target *-*-*} .-2 }
do i=1, n
array2(i) = array1(i) ! { dg-message "loop has no data-dependences" }
end do
@@ -31,7 +30,6 @@ subroutine test_loop_nest_depth_1 ()
!$acc parallel loop auto copy(array1, array2) ! { dg-message "assigned OpenACC seq loop parallelism" }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-1 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-2 }
do i=1, n-1
array1(i+1) = array1(i) + 10 ! { dg-message "loop has data-dependences" }
array2(i) = array1(i)
diff --git a/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-3.f90 b/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-3.f90
index d635cc5e4fe..0338c878866 100644
--- a/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-3.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-3.f90
@@ -24,12 +24,10 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, m
array (1, i, j) = array(2, i, j) ! { dg-message "loop has no data-dependences" }
end do
@@ -42,13 +40,11 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
array (2, i, n) = array(1, i, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, m
array (1, i, j) = array (2, i,j) ! { dg-message "loop has no data-dependences" }
end do
@@ -61,13 +57,11 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do i=1, n-1
array (1, i+1, 1) = array (2, i, 1) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC gang vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, m
array (1, i, j) = array (2, i, j) ! { dg-message "loop has no data-dependences" }
end do
@@ -81,13 +75,11 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
array (2, i, n) = array (1, i, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do j=1, m-1
array (1, i, j+1) = array (1, i, j) ! { dg-message "loop has data-dependences" }
end do
diff --git a/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-4.f90 b/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-4.f90
index 97acecd8807..3d8fdd37d66 100644
--- a/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-4.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/loop-auto-transfer-4.f90
@@ -23,17 +23,14 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
!$acc loop auto
! { dg-message "assigned OpenACC worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, n
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do k=1, n
array (1, i, j, k) = array(2, i, j, k) ! { dg-message "loop has no data-dependences" }
end do
@@ -47,17 +44,14 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, n
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do k=1, n-1
array (1, i, j, k+1) = array(1, i, j, k) ! { dg-message "loop has data-dependences" }
end do
@@ -98,19 +92,16 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
array (2, i, n, n) = array (1, i, n, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, n-1
array (2, i, j, n) = array (1, i, j, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do k=1, n-1
array (2, i, j, k) = array(1, i, j, k) ! { dg-message "loop has no data-dependences" }
end do
@@ -126,19 +117,16 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
array (2, i, n, n) = array (1, i, n, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, n-1
array (2, i, j, n) = array (1, i, j, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do k=1, n-1
array (1, i, j, k+1) = array(1, i, j, k) ! { dg-message "loop has data-dependences" }
end do
@@ -154,19 +142,16 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
array (2, i, n, n) = array (1, i, n, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do j=1, n-1
array (1, i, j+1, n) = array (1, i, j, n) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do k=1, n-1
array (2, i, j, k) = array(1, i, j, k) ! { dg-message "loop has no data-dependences" }
end do
@@ -182,19 +167,16 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC gang vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do i=1, n
array (2, i, n, n) = array (1, i, n, n) ! { dg-message "loop has no data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do j=1, n-1
array (1, i, j+1, n) = array (1, i, j, n) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do k=1, n-1
array (1, i, j, k+1) = array(1, i, j, k) ! { dg-message "loop has data-dependences" }
end do
@@ -210,18 +192,15 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do i=1, n - 1
array (1, i+1, 1, 1) = array (1, i, 1, 1) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC gang worker loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, n
!$acc loop auto
! { dg-message "assigned OpenACC vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do k=1, n
array (1, i, j, k) = array(2, i, j, k) ! { dg-message "loop has no data-dependences" }
end do
@@ -237,18 +216,15 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do i=1, n - 1
array (1, i+1, 1, 1) = array (1, i, 1, 1) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC gang vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do j=1, n
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do k=1, n - 1
array (1, i, j, k+1) = array(1, i, j, k) ! { dg-message "loop has data-dependences" }
end do
@@ -264,19 +240,16 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do i=1, n - 1
array (1, i+1, 1, 1) = array (1, i, 1, 1) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do j=1, n - 1
array (1, i, j+1, 1) = array (1, i, j, 1) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC gang vector loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop can be parallel" "" {target *-*-*} .-3 }
do k=1, n
array (1, i, j, k) = array(2, i, j, k) ! { dg-message "loop has no data-dependences" }
end do
@@ -291,19 +264,16 @@ contains
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do i=1, n-1
array (1, i+1, 1, 1) = array (1, i, 1, 1) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do j=1, n-1
array (1, i, j+1, 1) = array (1, i, j, 1) ! { dg-message "loop has data-dependences" }
!$acc loop auto
! { dg-message "assigned OpenACC seq loop parallelism" "" {target *-*-*} .-1 }
! { dg-message "loop has no data-dependences" "OpenACC internal chunking CFG loop can be parallel" {target *-*-*} .-2 }
- ! { dg-message "'auto' loop cannot be parallel" "" {target *-*-*} .-3 }
do k=1, n-1
array (1, i, j, k+1) = array(1, i, j, k) ! { dg-message "loop has data-dependences" }
end do
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-function-1.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-function-1.f90
index c631f90b27f..3e6967d73ae 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-function-1.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-function-1.f90
@@ -147,3 +147,5 @@ contains
!$acc exit data copyout(nonlocal_a) delete(nonlocal_i) finalize
end subroutine nonlocal
end program main
+
+! { dg-prune-output ".*insufficient partitioning.*" }
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90
index 99cd22c3862..71d55f7db7c 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90
@@ -511,3 +511,180 @@ subroutine acc_parallel_loop_reduction ()
end do
end do
end subroutine acc_parallel_loop_reduction
+
+! The same tests as above, but inside a routine construct.
+subroutine acc_routine ()
+ implicit none (type, external)
+ !$acc routine gang
+ integer :: i, j, k, l, sum, diff
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ do j = 1, 10
+ !$acc loop reduction(+:sum)
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop collapse(2) ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ do j = 1, 10
+ do k = 1, 10
+ !$acc loop reduction(+:sum)
+ do l = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ do j = 1, 10
+ !$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ do k = 1, 10
+ !$acc loop reduction(+:sum)
+ do l = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do j = 1, 10
+ !$acc loop reduction(+:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do j = 1, 10
+ !$acc loop reduction(-:sum)
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do j = 1, 10
+ !$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ do k = 1, 10
+ !$acc loop reduction(*:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do l = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do j = 1, 10
+ !$acc loop reduction(+:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ do k = 1, 10
+ !$acc loop reduction(*:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do l = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum) reduction(-:diff)
+ do i = 1, 10
+ !$acc loop reduction(-:diff) ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ do j = 1, 10
+ !$acc loop reduction(+:sum)
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+
+ !$acc loop reduction(+:sum) ! { dg-warning "nested loop in reduction needs reduction clause for .diff." }
+ do j = 1, 10
+ !$acc loop reduction(-:diff)
+ do k = 1, 10
+ diff = 1
+ end do
+ end do
+ end do
+end subroutine acc_routine
+
+subroutine acc_kernels ()
+ integer :: i, j, k, sum, diff
+
+ ! FIXME: No diagnostics are produced for these loops because reductions
+ ! in kernels regions are not supported yet.
+ !$acc kernels
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ do j = 1, 10
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop
+ do j = 1, 10
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop reduction(-:diff)
+ do j = 1, 10
+ !$acc loop
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
+ do j = 1, 10
+ !$acc loop reduction(+:sum)
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+
+ !$acc loop reduction(+:sum)
+ do i = 1, 10
+ !$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do j = 1, 10
+ !$acc loop reduction(+:sum) ! { dg-warning "conflicting reduction operations for .sum." }
+ do k = 1, 10
+ sum = 1
+ end do
+ end do
+ end do
+ !$acc end kernels
+end subroutine acc_kernels
diff --git a/gcc/testsuite/gfortran.dg/goacc/private-explicit-kernels-1.f95 b/gcc/testsuite/gfortran.dg/goacc/private-explicit-kernels-1.f95
index 0c47045df9c..d231e00cf5c 100644
--- a/gcc/testsuite/gfortran.dg/goacc/private-explicit-kernels-1.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/private-explicit-kernels-1.f95
@@ -28,19 +28,16 @@ program test
integer :: i3_5_s, j3_5_s, k3_5_s
!$acc kernels ! Explicit "private(i0_1)" clause cannot be specified here.
- ! { dg-final { scan-tree-dump-times "private\\(i0_1\\)" 1 "original" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(i0_1\\)" 1 "gimple" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "#pragma omp target oacc_kernels map\\(force_tofrom:i0_1 \\\[len: \[0-9\]+\\\]\\)" 0 "gimple" { xfail *-*-* } } } ! PR90067
+ ! The "private" clause gets added in the "omp_data_optimize" pass and is hence
+ ! not there in the "original"
+ ! { dg-final { scan-tree-dump-times "private\\(i0_1\\)" 0 "original"} }
do i0_1 = 1, 100
end do
!$acc end kernels
!$acc kernels ! Explicit "private(i0_2, j0_2)" clause cannot be specified here.
- ! { dg-final { scan-tree-dump-times "private\\(i0_2\\)" 1 "original" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(j0_2\\)" 1 "original" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(i0_2\\)" 1 "gimple" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(j0_2\\)" 1 "gimple" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "#pragma omp target oacc_kernels map\\(force_tofrom:j0_2 \\\[len: \[0-9\]+\\\]\\) map\\(force_tofrom:i0_2 \\\[len: \[0-9\]+\\\]\\)" 0 "gimple" { xfail *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "private\\(i0_2\\)" 0 "original" } }
+ ! { dg-final { scan-tree-dump-times "private\\(j0_2\\)" 0 "original" } }
do i0_2 = 1, 100
do j0_2 = 1, 100
end do
diff --git a/gcc/testsuite/gfortran.dg/goacc/private-predetermined-kernels-1.f95 b/gcc/testsuite/gfortran.dg/goacc/private-predetermined-kernels-1.f95
index 3357a20263e..ac576f9519c 100644
--- a/gcc/testsuite/gfortran.dg/goacc/private-predetermined-kernels-1.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/private-predetermined-kernels-1.f95
@@ -28,19 +28,19 @@ program test
integer :: i3_5_s, j3_5_s, k3_5_s
!$acc kernels
- ! { dg-final { scan-tree-dump-times "private\\(i0_1\\)" 1 "original" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(i0_1\\)" 1 "gimple" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "#pragma omp target oacc_kernels map\\(force_tofrom:i0_1 \\\[len: \[0-9\]+\\\]\\)" 0 "gimple" { xfail *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "private\\(i0_1\\)" 0 "original" { target *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "private\\(i0_1\\)" 1 "gimple" { target *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "#pragma omp target oacc_kernels map\\(force_tofrom:i0_1 \\\[len: \[0-9\]+\\\]\\)" 0 "gimple" { target *-*-* } } } ! PR90067
do i0_1 = 1, 100
end do
!$acc end kernels
!$acc kernels
- ! { dg-final { scan-tree-dump-times "private\\(i0_2\\)" 1 "original" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(j0_2\\)" 1 "original" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(i0_2\\)" 1 "gimple" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "private\\(j0_2\\)" 1 "gimple" { xfail *-*-* } } } ! PR90067
- ! { dg-final { scan-tree-dump-times "#pragma omp target oacc_kernels map\\(force_tofrom:j0_2 \\\[len: \[0-9\]+\\\]\\) map\\(force_tofrom:i0_2 \\\[len: \[0-9\]+\\\]\\)" 0 "gimple" { xfail *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "private\\(i0_2\\)" 0 "original" { target *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "private\\(j0_2\\)" 0 "original" { target *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "private\\(i0_2\\)" 1 "gimple" { target *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "private\\(j0_2\\)" 1 "gimple" { target *-*-* } } } ! PR90067
+ ! { dg-final { scan-tree-dump-times "#pragma omp target oacc_kernels map\\(force_tofrom:j0_2 \\\[len: \[0-9\]+\\\]\\) map\\(force_tofrom:i0_2 \\\[len: \[0-9\]+\\\]\\)" 0 "gimple" { target *-*-* } } } ! PR90067
do i0_2 = 1, 100
do j0_2 = 1, 100
end do
diff --git a/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90 b/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90
index 10e109675dc..a09eae1f3b3 100644
--- a/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90
@@ -1,6 +1,7 @@
! OpenACC 'routine' directives inside a Fortran module.
! { dg-additional-options "-fopt-info-optimized-omp" }
+! { dg-additional-options "-O0" }
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
@@ -100,7 +101,6 @@ contains
subroutine g_1
implicit none
!$acc routine gang
- ! { dg-bogus "\[Ww\]arning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .-3 }
integer :: i
diff --git a/gcc/testsuite/gfortran.dg/goacc/uninit-copy-clause.f95 b/gcc/testsuite/gfortran.dg/goacc/uninit-copy-clause.f95
index 97fbe1268b7..b2aae1df522 100644
--- a/gcc/testsuite/gfortran.dg/goacc/uninit-copy-clause.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/uninit-copy-clause.f95
@@ -5,8 +5,6 @@ subroutine foo
integer :: i
!$acc kernels
- ! { dg-warning "'i' is used uninitialized in this function" "" { target *-*-* } .-1 }
- !TODO See discussion in '../../c-c++-common/goacc/uninit-copy-clause.c'.
i = 1
!$acc end kernels
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 770f4ff726f..ae37caa6901 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,25 @@
+2021-11-16 Frederik Harwath <frederik@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/pr84955-1.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/pr85486-2.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/pr85486-3.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/pr85486.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c: Adjust.
+ * testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c: Adjust.
+ * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90: Adjust.
+ * testsuite/libgomp.oacc-fortran/pr94358-1.f90: Adjust.
+ * testsuite/libgomp.oacc-fortran/parallel-loop-auto-reduction-2.f90: Removed.
+
2021-11-16 Andrew Stubbs <ams@codesourcery.com>
* testsuite/libgomp.oacc-c-c++-common/runtime-alias-check-1.c: New test.
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c
index 34add4bc382..0acf2b74f8a 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c
@@ -45,21 +45,23 @@ static void f1 ()
/* { dg-missed {'map\(tofrom:b [^)]+\)' not optimized: b is unsuitable for privatization} "" { target *-*-* } .-1 }
{ dg-missed {'map\(force_tofrom:a [^)]+\)' not optimized: a is unsuitable for privatization} "" { target *-*-* } .-2 } */
{
- /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ /* { dg-note {beginning 'Graphite' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
int c = 234;
/* { dg-note {OpenACC 'kernels' decomposition: variable 'c' declared in block requested to be made addressable} {} { target *-*-* } l_compute$c_compute }
{ dg-note {variable 'c' made addressable} {} { target *-*-* } l_compute$c_compute }
{ dg-note {variable 'c' declared in block is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_compute$c_compute } */
+ /*TODO Hopefully, this is the same issue as '../../../gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c'. */
+ (volatile int *) &c;
+
#pragma acc loop independent gang /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (int i = 0; i < N; ++i)
b[i] = c;
- /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ /* { dg-note {beginning 'Graphite' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
a = c;
/* PR104132, PR104133, PR104774 */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
index c27c8884dc2..ee90420dbcb 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
@@ -23,7 +23,6 @@
/* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
aspects of that functionality. */
-/* { dg-additional-options "-O2" } for Graphite/"kernels". */
/* See also '../libgomp.oacc-fortran/parallel-dims.f90'. */
@@ -248,7 +247,6 @@ int main ()
reduction (min: gangs_min, workers_min, vectors_min) reduction (max: gangs_max, workers_max, vectors_max) \
num_gangs (gangs)
/* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
- /* { dg-bogus {warning: region is gang partitioned but does not contain gang partitioned code} {TODO 'reduction'} { xfail *-*-* } l_compute$c_compute } */
{
if (acc_on_device (acc_device_host))
/* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target { c++ && { ! __OPTIMIZE__ } } } .-1 }
@@ -723,6 +721,10 @@ int main ()
/* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-warning "removed gang worker vector partitioning from 'kernels' region" "" { target *-*-* } l_loop_i$c_loop_i } */
for (int i = N; i > -N; --i)
{
/* This is to make the loop unparallelizable. */
@@ -828,7 +830,7 @@ int main ()
__builtin_abort ();
if (gangs_min != 0 || gangs_max != 1 - 1
|| workers_min != 0 || workers_max != 1 - 1
- || vectors_min != 0 || vectors_max != vectors_actual - 1)
+ || vectors_min != 0 || vectors_max >= vectors_actual)
__builtin_abort ();
}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955-1.c
index 44767cd27c3..0fbfeb0b610 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955-1.c
@@ -28,4 +28,3 @@ f2 (void)
return i + j;
}
-/* { dg-final { scan-tree-dump-not "if" "cddce2"} } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
index 84b9c01443e..3898b1c55ab 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
@@ -15,8 +15,8 @@ main (void)
return 0;
}
-/* Todo: Boths bar.syncs can be removed.
- Atm we generate this dead code inbetween forked and joining:
+/* All bar.syncs can be removed.
+ Previously, we generated dead code inbetween forked and joining:
mov.u32 %r28, %ntid.y;
mov.u32 %r29, %tid.y;
@@ -31,6 +31,6 @@ main (void)
@%r33 bra $L3;
$L2:
- so the loop is not recognized as empty loop (which we detect by seeing if
+ so the loop was not recognized as empty loop (which we detect by seeing if
joining immediately follows forked). */
-/* { dg-final { scan-offload-rtl-dump-times "nvptx_barsync" 2 "mach" } } */
+/* { dg-final { scan-offload-rtl-dump-times "nvptx_barsync" 0 "mach" } } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
index e1679444172..0aeaf7799f6 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
@@ -11,11 +11,11 @@ main (void)
{
#pragma acc loop worker
for (int i = 0; i < n; i++)
- ;
+ asm volatile ("");
#pragma acc loop worker
for (int i = 0; i < n; i++)
- ;
+ asm volatile ("");
}
return 0;
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-2.c
index 6bd42ec3a7c..2b265d6aba0 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-2.c
@@ -7,5 +7,5 @@
#include "pr85486.c"
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccdevlow3" } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=1, vectors=32" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-3.c
index 5d05540ce46..e4589734ac2 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-3.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486-3.c
@@ -7,5 +7,5 @@
#include "pr85486.c"
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccloops" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccdevlow3" } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=1, vectors=32" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486.c
index 10f84dad509..f0c338a49d3 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85486.c
@@ -54,5 +54,5 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccloops" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccdevlow3" } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=1, vectors=32" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c
index 22891a243e1..95946c581b1 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c
@@ -1,5 +1,5 @@
/* { dg-do run { target openacc_nvidia_accel_selected } } */
-/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow1" } */
+/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow" } */
/* { dg-set-target-env-var "GOMP_DEBUG" "1" } */
#include <stdlib.h>
@@ -34,5 +34,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 128\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 128\\)" "oaccdevlow1" { target { any-opts "-O[123s]"} } } } *
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 128\\)" "oaccdevlow3" { target { any-opts "-O[0g]"} } } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=1, vectors=128" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c
index 30418f378f9..cab21013dae 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c
@@ -1,6 +1,6 @@
/* { dg-do run { target openacc_nvidia_accel_selected } } */
/* { dg-additional-options "-fopenacc-dim=::128" } */
-/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow1" } */
+/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow" } */
/* { dg-set-target-env-var "GOMP_DEBUG" "1" } */
#include <stdlib.h>
@@ -35,5 +35,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 128\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 128\\)" "oaccdevlow1" { target { any-opts "-O[123s]"} } } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 128\\)" "oaccdevlow3" { target { any-opts "-O[0g]"} } } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=1, vectors=128" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c
index 754964d6010..003057415fc 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c
@@ -1,5 +1,5 @@
/* { dg-do run { target openacc_nvidia_accel_selected } } */
-/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow1" } */
+/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow" } */
/* We default to warp size 32 for the vector length, so the GOMP_OPENACC_DIM has
no effect. */
/* { dg-set-target-env-var "GOMP_OPENACC_DIM" "::128" } */
@@ -38,5 +38,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccdevlow1" { target { any-opts "-O[123s]"} } } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 1, 32\\)" "oaccdevlow3" { target { any-opts "-O[0g]"} } } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=1, vectors=32" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c
index 44364cbc51a..b004a9d5072 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c
@@ -1,5 +1,5 @@
/* { dg-do run { target openacc_nvidia_accel_selected } } */
-/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow1" } */
+/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow" } */
/* { dg-set-target-env-var "GOMP_DEBUG" "1" } */
#include <stdlib.h>
@@ -36,5 +36,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 2, 128\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 2, 128\\)" "oaccdevlow1" { target { any-opts "-O[123s]"} } } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 2, 128\\)" "oaccdevlow3" { target { any-opts "-O[0g]"} } } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=2, vectors=128" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c
index 5e387c6ced6..9e7f9a2d9ed 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c
@@ -1,6 +1,6 @@
/* { dg-do run { target openacc_nvidia_accel_selected } } */
/* { dg-additional-options "-fopenacc-dim=:2:128" } */
-/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow1" } */
+/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow" } */
/* { dg-set-target-env-var "GOMP_DEBUG" "1" } */
#include <stdlib.h>
@@ -37,5 +37,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 2, 128\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 2, 128\\)" "oaccdevlow1" { target { any-opts "-O[123s]"} } } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 2, 128\\)" "oaccdevlow3" { target { any-opts "-O[0g]"} } } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=2, vectors=128" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c
index d32f4e4417a..01b186e91bd 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c
@@ -1,6 +1,6 @@
/* { dg-do run { target openacc_nvidia_accel_selected } } */
/* { dg-set-target-env-var "GOMP_OPENACC_DIM" ":2:" } */
-/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow1" } */
+/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow" } */
/* { dg-set-target-env-var "GOMP_DEBUG" "1" } */
#include <stdlib.h>
@@ -37,5 +37,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 0, 128\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 0, 128\\)" "oaccdevlow1" { target { any-opts "-O[123s]"} } } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 0, 128\\)" "oaccdevlow3" { target { any-opts "-O[0g]"} } } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=2, vectors=128" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c
index b3a13a1e107..832fdf5bca5 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c
@@ -1,5 +1,5 @@
/* { dg-do run { target openacc_nvidia_accel_selected } } */
-/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow1" } */
+/* { dg-additional-options "-foffload=-fdump-tree-oaccdevlow" } */
/* { dg-set-target-env-var "GOMP_DEBUG" "1" } */
#include <stdlib.h>
@@ -36,5 +36,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 0, 128\\)" "oaccdevlow1" } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 0, 128\\)" "oaccdevlow1" { target { any-opts "-O[123s]"} } } } */
+/* { dg-final { scan-offload-tree-dump "__attribute__\\(\\(oacc function \\(1, 0, 128\\)" "oaccdevlow3" { target { any-opts "-O[0g]"} } } } */
/* { dg-output "nvptx_exec: kernel main\\\$_omp_fn\\\$0: launch gangs=1, workers=\[1-8\], vectors=128" } */
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90 b/libgomp/testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90
index 0a612a57964..a9131a06f77 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90
@@ -1,5 +1,10 @@
! { dg-do run }
-!
+! { dg-xfail-run-if "PR102424" { ! openacc_host_selected } }
+! TODO PR102424 OpenACC 'reduction' with outer 'loop seq', inner 'loop gang'
+
+! { dg-additional-options "-O2" }
+! { dg-additional-options "-fopt-info-omp" }
+
program foo
IMPLICIT NONE
@@ -17,9 +22,10 @@ subroutine bar(vol)
INTEGER :: j,k
!$ACC KERNELS
- !$ACC LOOP REDUCTION(+:vol)
+ ! TODO The "reduction" dependence handling in Graphite should be adjusted to take the outer "reduction" into account correctly
+ !$ACC LOOP REDUCTION(+:vol) ! { dg-bogus "optimized: assigned OpenACC seq loop parallelism" "TODO Suboptimal parallelism assigned" { xfail *-*-* } }
DO k=1,2
- !$ACC LOOP REDUCTION(+:vol)
+ !$ACC LOOP REDUCTION(+:vol) ! { dg-bogus "optimized: assigned OpenACC gang vector loop parallelism" "TODO Suboptimal parallelism assigned" { xfail *-*-* } }
DO j=1,2
vol = vol + 1
ENDDO
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/parallel-loop-auto-reduction-2.f90 b/libgomp/testsuite/libgomp.oacc-fortran/parallel-loop-auto-reduction-2.f90
deleted file mode 100644
index 0e9da426d99..00000000000
--- a/libgomp/testsuite/libgomp.oacc-fortran/parallel-loop-auto-reduction-2.f90
+++ /dev/null
@@ -1,98 +0,0 @@
-! Check that the Graphite-based "auto" loop and "kernels" handling
-! is able to assign the parallelism dimensions correctly for a simple
-! loop-nest with reductions. All loops should be parallelized.
-
-! { dg-additional-options "-O2 -g" }
-! { dg-additional-options "-foffload=-fdump-tree-oaccloops1-details" }
-! { dg-additional-options "-foffload=-fopt-info-optimized" }
-! { dg-additional-options "-fdump-tree-oaccloops1-details" }
-! { dg-additional-options "-fopt-info-optimized" }
-
-module test
- implicit none
-
- integer, parameter :: n = 10000
- integer :: a(n,n)
- integer :: sums(n,n)
-
-contains
- function sum_loop_auto() result(sum)
- integer :: i, j
- integer :: sum, max_val
-
- sum = 0
- max_val = 0
-
- !$acc parallel copyin (a) reduction(+:sum)
- !$acc loop auto reduction(+:sum) reduction(max:max_val) ! { dg-optimized "assigned OpenACC gang worker loop parallelism" }
- ! { dg-optimized ".auto. loop can be parallel" "" { target *-*-* } .-1 }
- do i = 1,size (a, 1)
- !$acc loop auto reduction(max:max_val) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
- ! { dg-optimized ".auto. loop can be parallel" "" { target *-*-* } .-1 }
- do j = 1,size(a, 2)
- max_val = a(i,j)
- end do
- sum = sum + max_val
- end do
- !$acc end parallel
- end function sum_loop_auto
-
- function sum_kernels() result(sum)
- integer :: i, j
- integer :: sum, max_val
-
- sum = 0
- max_val = 0
-
- !$acc kernels
- ! { dg-optimized {'map\(force_tofrom:max_val [^)]+\)' optimized to 'map\(to:max_val [^)]+\)'} "" { target *-*-* } .-1 }
- !$acc loop reduction(+:sum) reduction(max:max_val) ! { dg-optimized "assigned OpenACC gang worker loop parallelism" }
- ! { dg-optimized ".auto. loop can be parallel" "" { target *-*-* } .-1 }
- ! { dg-optimized "forwarded loop nest in OpenACC .kernels. construct to .Graphite." "" { target *-*-* } .-2 }
- do i = 1,size (a, 1)
- !$acc loop reduction(max:max_val) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
- ! { dg-optimized ".auto. loop can be parallel" "" { target *-*-* } .-1 }
- do j = 1,size(a, 2)
- max_val = a(i,j)
- end do
- sum = sum + max_val
- end do
- !$acc end kernels
- end function sum_kernels
-end module test
-
-program main
- use test
-
- implicit none
-
- integer :: result, i, j
-
- ! We sum the maxima of n rows, each containing numbers
- ! 1..n
- integer, parameter :: expected_sum = n * n
-
- do i = 1, size (a, 1) ! { dg-optimized "loop nest optimized" }
- do j = 1, size (a, 2)
- a(i, j) = j
- end do
- end do
-
-
- result = sum_loop_auto()
- if (result /= expected_sum) then
- write (*, *) "Wrong result:", result
- call abort()
- endif
-
- result = sum_kernels()
- if (result /= expected_sum) then
- write (*, *) "Wrong result:", result
- call abort()
- endif
-end program main
-
-! This ensures that the dg-optimized assertions above hold for both
-! compilers because the output goes to stderr and the dump file.
-! { dg-final { scan-offload-tree-dump-times "optimized: assigned OpenACC .*? parallelism" 4 "oaccloops1" } }
-! { dg-final { scan-tree-dump-times "optimized: assigned OpenACC .*? parallelism" 4 "oaccloops1" } }
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90
index 588d70dbf31..df8bd4d5f7f 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90
@@ -30,14 +30,12 @@ subroutine kernel(lo, hi, a, b, c)
! { dg-missed {'map\(tofrom:\*b [^)]+\)' not optimized: \*b is unsuitable for privatization} "" { target *-*-* } .-3 }
! { dg-missed {'map\(tofrom:\*a [^)]+\)' not optimized: \*a is unsuitable for privatization} "" { target *-*-* } .-4 }
!$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = lo, hi
b(i) = a(i)
end do
!$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = lo, hi
More information about the Gcc-cvs
mailing list