Message ID | 20191016190751.70236-1-julian@codesourcery.com |
---|---|
State | New |
Headers | show |
Series | [og9] Fix libgomp serial-dims.c test for AMD GCN | expand |
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 \