+2018-12-19 Tom de Vries <tdevries@suse.de>
+
+ * gcc.dg/goacc/nvptx-merged-loop.c: Move to
+ libgomp/testsuite/libgomp.oacc-c-c++-common.
+ * gcc.dg/goacc/nvptx-sese-1.c: Same.
+
2018-12-19 Tom de Vries <tom@codesourcery.com>
* lib/scanoffloadrtl.exp: New file.
+++ /dev/null
-/* { dg-do link } */
-/* { dg-require-effective-target offload_nvptx } */
-/* { dg-options "-fopenacc -O2 -foffload=-fdump-rtl-mach\\ -dumpbase\\ nvptx-merged-loop.c\\ -Wa,--no-verify" } */
-
-#define N (32*32*32+17)
-void __attribute__ ((noinline)) Foo (int *ary)
-{
- int ix;
-
-#pragma acc parallel num_workers(32) vector_length(32) copyout(ary[0:N])
- {
- /* Loop partitioning should be merged. */
-#pragma acc loop worker vector
- for (unsigned ix = 0; ix < N; ix++)
- {
- ary[ix] = ix;
- }
- }
-}
-
-int main ()
-{
- int ary[N];
-
- Foo (ary);
-
- return 0;
-}
-
-/* { dg-final { scan-rtl-dump "Merging loop .* into " "mach" } } */
+++ /dev/null
-/* { dg-do link } */
-/* { dg-require-effective-target offload_nvptx } */
-/* { dg-options "-fopenacc -O2 -foffload=-fdump-rtl-mach\\ -dumpbase\\ nvptx-sese-1.c\\ -Wa,--no-verify" } */
-
-#pragma acc routine seq
-int __attribute__((noinline)) foo (int x)
-{
- return x & 2;
-}
-
-int main ()
-{
- int r = 0;
-
-#pragma acc parallel copy(r) vector_length(32)
- {
-#pragma acc loop vector reduction (+:r)
- for (int i = 00; i < 40; i++)
- r += i;
-
- /* This piece is a multi-block SESE region */
- if (foo (r))
- r *= 2;
-
- if (r & 1) /* to here. */
-#pragma acc loop vector reduction (+:r)
- for (int i = 00; i < 40; i++)
- r += i;
- }
-
- return 0;
-}
-
-/* Match {N->N(.N)+} */
-/* { dg-final { scan-rtl-dump "SESE regions:.* \[0-9\]+{\[0-9\]+->\[0-9\]+(\\.\[0-9\]+)+}" "mach" } } */
+2018-12-19 Tom de Vries <tdevries@suse.de>
+
+ * testsuite/lib/libgomp.exp: Add load_lib of scanoffloadrtl.exp.
+ * testsuite/libgomp.oacc-c-c++-common/nvptx-merged-loop.c: Move from
+ gcc/testsuite/gcc.dg/goacc.
+ * testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c: Same.
+
2018-12-14 Thomas Schwinge <thomas@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
load_gcc_lib scantree.exp
load_gcc_lib scanltranstree.exp
load_gcc_lib scanoffloadtree.exp
+load_gcc_lib scanoffloadrtl.exp
load_gcc_lib scanipa.exp
load_gcc_lib scanwpaipa.exp
load_gcc_lib timeout-dg.exp
--- /dev/null
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+/* { dg-options "-foffload=-fdump-rtl-mach" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+
+#define N (32*32*32+17)
+void __attribute__ ((noinline)) Foo (int *ary)
+{
+ int ix;
+
+#pragma acc parallel num_workers(32) vector_length(32) copyout(ary[0:N])
+ {
+ /* Loop partitioning should be merged. */
+#pragma acc loop worker vector
+ for (unsigned ix = 0; ix < N; ix++)
+ {
+ ary[ix] = ix;
+ }
+ }
+}
+
+int main ()
+{
+ int ary[N];
+
+ Foo (ary);
+
+ return 0;
+}
+
+/* { dg-final { scan-offload-rtl-dump "Merging loop .* into " "mach" } } */
--- /dev/null
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+/* { dg-options "-foffload=-fdump-rtl-mach" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+
+#pragma acc routine seq
+int __attribute__((noinline)) foo (int x)
+{
+ return x & 2;
+}
+
+int main ()
+{
+ int r = 0;
+
+#pragma acc parallel copy(r) vector_length(32)
+ {
+#pragma acc loop vector reduction (+:r)
+ for (int i = 00; i < 40; i++)
+ r += i;
+
+ /* This piece is a multi-block SESE region */
+ if (foo (r))
+ r *= 2;
+
+ if (r & 1) /* to here. */
+#pragma acc loop vector reduction (+:r)
+ for (int i = 00; i < 40; i++)
+ r += i;
+ }
+
+ return 0;
+}
+
+/* Match {N->N(.N)+} */
+/* { dg-final { scan-offload-rtl-dump "SESE regions:.* \[0-9\]+{\[0-9\]+->\[0-9\]+(\\.\[0-9\]+)+}" "mach" } } */