aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-06-30 05:24:17 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:15:30 -0300
commitd83833092f22d368c5a34871bdc10523e58391e3 (patch)
tree8de9ec6a192c6e3a4a97c58def404916907a08b6
parentd32be8f04f76e193dbdca1be6b1a5ac54994e2b3 (diff)
downloadgcc-d83833092f22d368c5a34871bdc10523e58391e3.zip
gcc-d83833092f22d368c5a34871bdc10523e58391e3.tar.gz
gcc-d83833092f22d368c5a34871bdc10523e58391e3.tar.bz2
[testsuite] Replace fragile 'scan-assembler' with 'scan-offload-rtl' in 'libgomp.oacc-c-c++-common/pr85381*.c'
These test cases use directives similar to: /* { dg-additional-options "-save-temps" } */ /* { dg-final { scan-assembler-times "bar.sync" 2 } } */ This expects to scan the PTX offloading compilation assembler code (not host code!), expecting that nvptx offloading code assembly is produced after the host code, and thus overwrites the latter file. (Yes, that's certainly ugly/fragile...) ..., and this broke with recent commit 1dedc12d186a110854537e1279b4e6c29f2df35a "revamp dump and aux output names" plus fix-up commit commit efc16503ca10bc0e934e0bace5777500e4dc757a "handle dumpbase in offloading, adjust testsuite" (short summary: file names changed), so let's finally make that robust. libgomp/ * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Replace fragile 'scan-assembler' with 'scan-offload-rtl'. * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/pr85381.c: Likewise.
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c4
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c4
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c4
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-5.c4
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381.c4
5 files changed, 10 insertions, 10 deletions
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 6570c64..84b9c01 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
@@ -1,6 +1,6 @@
-/* { dg-additional-options "-save-temps" } */
/* { dg-do run { target openacc_nvidia_accel_selected } }
{ dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-additional-options "-foffload=-fdump-rtl-mach" } */
int
main (void)
@@ -33,4 +33,4 @@ main (void)
so the loop is not recognized as empty loop (which we detect by seeing if
joining immediately follows forked). */
-/* { dg-final { scan-assembler-times "bar.sync" 2 } } */
+/* { dg-final { scan-offload-rtl-dump-times "nvptx_barsync" 2 "mach" } } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c
index c5d1c5a..cddbf27 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c
@@ -1,6 +1,6 @@
-/* { dg-additional-options "-save-temps -w" } */
/* { dg-do run { target openacc_nvidia_accel_selected } }
{ dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-additional-options "-foffload=-fdump-rtl-mach" } */
int a;
#pragma acc declare create(a)
@@ -32,4 +32,4 @@ main (void)
return 0;
}
-/* { dg-final { scan-assembler-not "bar.sync" } } */
+/* { dg-final { scan-offload-rtl-dump-not "nvptx_barsync" "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 d955d79..e167944 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
@@ -1,6 +1,6 @@
-/* { dg-additional-options "-save-temps -w" } */
/* { dg-do run { target openacc_nvidia_accel_selected } }
{ dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-additional-options "-foffload=-fdump-rtl-mach" } */
#define n 1024
@@ -24,4 +24,4 @@ main (void)
/* Atm, %ntid.y is broadcast from one loop to the next, so there are 2 bar.syncs
for that (the other two are there for the same reason as in pr85381-2.c).
Todo: Recompute %ntid.y instead of broadcasting it. */
-/* { dg-final { scan-assembler-times "bar.sync" 4 } } */
+/* { dg-final { scan-offload-rtl-dump-times "nvptx_barsync" 4 "mach" } } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-5.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-5.c
index 61e7e48..26ca509 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-5.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-5.c
@@ -1,6 +1,6 @@
-/* { dg-additional-options "-save-temps" } */
/* { dg-do run { target openacc_nvidia_accel_selected } }
{ dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-additional-options "-foffload=-fdump-rtl-mach" } */
#define n 1024
@@ -21,4 +21,4 @@ main (void)
return 0;
}
-/* { dg-final { scan-assembler-not "bar.sync" } } */
+/* { dg-final { scan-offload-rtl-dump-not "nvptx_barsync" "mach" } } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381.c
index 2864dfc..eda8774 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381.c
@@ -1,6 +1,6 @@
-/* { dg-additional-options "-save-temps" } */
/* { dg-do run { target openacc_nvidia_accel_selected } }
{ dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-additional-options "-foffload=-fdump-rtl-mach" } */
int
main (void)
@@ -15,4 +15,4 @@ main (void)
return 0;
}
-/* { dg-final { scan-assembler-not "bar.sync" } } */
+/* { dg-final { scan-offload-rtl-dump-not "nvptx_barsync" "mach" } } */