]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] Fix libgomp serial-dims.c test for AMD GCN
authorJulian Brown <julian@codesourcery.com>
Wed, 16 Oct 2019 15:28:32 +0000 (08:28 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:51:25 +0000 (12:51 +0100)
libgomp/
* testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Support AMD GCN.

(cherry picked from openacc-gcc-9-branch commit
195a5318951ab947de00a4372d216ba9536493d3)

libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c

index 2ed786942797bf732e2c02e4fd157a867e0c839a..bf880ac0c5e6439ecad3f16c103e1e63ede1d22d 100644 (file)
@@ -1,3 +1,7 @@
+2019-10-16  Julian Brown  <julian@codesourcery.com>
+
+       * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Support AMD GCN.
+
 2019-10-09  Tobias Burnus  <tobias@codesourcery.com>
 
        * testsuite/libgomp.fortran/use_device_ptr1.f90: New.
index 3895405b2cfd325927bd1d29f2ca7e8b4d2d34e3..e373ebd37b78ce8e4f5f27abc83d0201a3bd9dd8 100644 (file)
@@ -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 \