aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2019-09-11 08:31:38 -0700
committerThomas Schwinge <thomas@codesourcery.com>2020-03-03 12:51:25 +0100
commit2bbadef82d86eb22d9ca20817481e19a20ff4478 (patch)
tree79251b3acb620aeda97d1fbbda55887f860b4c39 /libgomp
parent2e2b9bc5300652abf7a1968e08c9b4c2ed1b7e6c (diff)
downloadgcc-2bbadef82d86eb22d9ca20817481e19a20ff4478.zip
gcc-2bbadef82d86eb22d9ca20817481e19a20ff4478.tar.gz
gcc-2bbadef82d86eb22d9ca20817481e19a20ff4478.tar.bz2
[og9] A couple of GCN-specific test fixes
libgomp/ * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run NVidia-specific test on NVidia hardware. * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main): Initialise for acc_device_gcn if testing on AMD GCN. * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: Support AMD GCN. * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip vector dimension test for AMD GCN. (cherry picked from openacc-gcc-9-branch commit 0467f885d40e76d2d34dac372e4b3dd9b84c31f1)
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog.omp11
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/async_queue-1.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c4
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c11
5 files changed, 25 insertions, 5 deletions
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 14ed4e0..1a624af 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,14 @@
+2019-09-17 Julian Brown <julian@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run
+ NVidia-specific test on NVidia hardware.
+ * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main):
+ Initialise for acc_device_gcn if testing on AMD GCN.
+ * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: Support
+ AMD GCN.
+ * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip
+ vector dimension test for AMD GCN.
+
2019-09-13 Tobias Burnus <tobias@codesourcery.com>
* plugin/plugin-gcn.c (hsa_warn, hsa_fatal, hsa_error): Ensure
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/async_queue-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/async_queue-1.c
index 544b19f..4f9e53d 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/async_queue-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/async_queue-1.c
@@ -1,3 +1,5 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
/* Test mapping of async values to specific underlying queues. */
#undef NDEBUG
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c
index 4ab6736..840052f 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c
@@ -26,6 +26,8 @@ main ()
acc_device_t d;
#if defined ACC_DEVICE_TYPE_nvidia
d = acc_device_nvidia;
+#elif defined ACC_DEVICE_TYPE_gcn
+ d = acc_device_gcn;
#elif defined ACC_DEVICE_TYPE_host
d = acc_device_host;
#else
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c
index fdf4eb0..517004a 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c
@@ -1,11 +1,11 @@
/* { dg-do link } */
-/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target openacc_nvidia_accel_selected } } */
+/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target { openacc_nvidia_accel_selected || openacc_amdgcn_accel_selected } } } */
int var;
#pragma acc declare create (var)
void __attribute__((noinline, noclone))
-foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target openacc_nvidia_accel_selected } } */
+foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target { openacc_nvidia_accel_selected || openacc_amdgcn_accel_selected } } } */
{
var++;
}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c
index dd8107c..5cd0e31 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c
@@ -80,13 +80,18 @@ int check (const int *ary, int size, int gp, int wp, int vp)
exit = 1;
}
+#ifndef ACC_DEVICE_TYPE_gcn
+ /* AMD GCN uses the autovectorizer for the vector dimension: the use
+ of a function call in vector-partitioned code in this test is not
+ currently supported. */
for (ix = 0; ix < vp; ix++)
if (vectors[ix] != vectors[0])
{
- printf ("vector %d not used %d times\n", ix, vectors[0]);
- exit = 1;
+ printf ("vector %d not used %d times\n", ix, vectors[0]); exit
+ = 1;
}
-
+#endif
+
return exit;
}