This patch adds support for AMD GCN offloading to the
libgomp.oacc-c-c++-common/serial-dims.c test case.

I will apply to the og9 branch shortly.

Thanks,

Julian

ChangeLog

        libgomp/
        * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Support AMD GCN.
---
 libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c 
b/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c
index 3895405b2cf..e373ebd37b7 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c
@@ -69,6 +69,13 @@ int main ()
          /* The GCC nvptx back end enforces vector_length (32).  */
          vectors_actual = 32;
        }
+      else if (acc_on_device (acc_device_gcn))
+       {
+         /* AMD GCN relies on the autovectorizer for the vector dimension:
+            the loop below isn't likely to be vectorized, so vectors_actual
+            is effectively 1.  */
+         vectors_actual = 1;
+       }
       else if (!acc_on_device (acc_device_host))
        __builtin_abort ();
 #pragma acc loop gang \
-- 
2.23.0

Reply via email to