From 49188cd1f2deb943e4047dbffba7a333875d6479 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 19 Dec 2018 14:20:44 +0000 Subject: [PATCH] [nvptx, libgomp] Move rtl-dump test-cases to libgomp The goacc.exp test-cases nvptx-merged-loop.c and nvptx-sese-1.c are failing during linking due to missing libgomp.spec. Move them to the libgomp testsuite. Build and reg-tested on x86_64 with nvptx accelerator. 2018-12-19 Tom de Vries * gcc.dg/goacc/nvptx-merged-loop.c: Move to libgomp/testsuite/libgomp.oacc-c-c++-common. * gcc.dg/goacc/nvptx-sese-1.c: Same. * 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. From-SVN: r267267 --- gcc/testsuite/ChangeLog | 6 ++++++ libgomp/ChangeLog | 7 +++++++ libgomp/testsuite/lib/libgomp.exp | 1 + .../libgomp.oacc-c-c++-common}/nvptx-merged-loop.c | 8 ++++---- .../testsuite/libgomp.oacc-c-c++-common}/nvptx-sese-1.c | 8 ++++---- 5 files changed, 22 insertions(+), 8 deletions(-) rename {gcc/testsuite/gcc.dg/goacc => libgomp/testsuite/libgomp.oacc-c-c++-common}/nvptx-merged-loop.c (59%) rename {gcc/testsuite/gcc.dg/goacc => libgomp/testsuite/libgomp.oacc-c-c++-common}/nvptx-sese-1.c (63%) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8f1353465c3..31aff7d80c1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-12-19 Tom de Vries + + * 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 * lib/scanoffloadrtl.exp: New file. diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 084f174513b..ad0abb8a95e 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,10 @@ +2018-12-19 Tom de Vries + + * 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 Chung-Lin Tang diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index c41b3e6dc18..04738a9ce82 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -31,6 +31,7 @@ load_gcc_lib scanrtl.exp 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 diff --git a/gcc/testsuite/gcc.dg/goacc/nvptx-merged-loop.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-merged-loop.c similarity index 59% rename from gcc/testsuite/gcc.dg/goacc/nvptx-merged-loop.c rename to libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-merged-loop.c index 3ff537c1d97..8a2117e1624 100644 --- a/gcc/testsuite/gcc.dg/goacc/nvptx-merged-loop.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-merged-loop.c @@ -1,6 +1,6 @@ -/* { 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" } */ +/* { 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) @@ -27,4 +27,4 @@ int main () return 0; } -/* { dg-final { scan-rtl-dump "Merging loop .* into " "mach" } } */ +/* { dg-final { scan-offload-rtl-dump "Merging loop .* into " "mach" } } */ diff --git a/gcc/testsuite/gcc.dg/goacc/nvptx-sese-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c similarity index 63% rename from gcc/testsuite/gcc.dg/goacc/nvptx-sese-1.c rename to libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c index 7e67fe78f06..9583265c775 100644 --- a/gcc/testsuite/gcc.dg/goacc/nvptx-sese-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c @@ -1,6 +1,6 @@ -/* { 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" } */ +/* { 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) @@ -32,4 +32,4 @@ int main () } /* Match {N->N(.N)+} */ -/* { dg-final { scan-rtl-dump "SESE regions:.* \[0-9\]+{\[0-9\]+->\[0-9\]+(\\.\[0-9\]+)+}" "mach" } } */ +/* { dg-final { scan-offload-rtl-dump "SESE regions:.* \[0-9\]+{\[0-9\]+->\[0-9\]+(\\.\[0-9\]+)+}" "mach" } } */ -- 2.30.2