aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul-Antoine Arras <pa@codesourcery.com>2022-11-29 16:22:07 +0100
committerPaul-Antoine Arras <pa@codesourcery.com>2022-11-30 10:51:42 +0100
commit1fd508744eccda9ad9c6d6fcce5b2ea9c568818d (patch)
treecc7b73cf63318f5c36fdeb11ca363563e8ecdd91 /gcc
parenta1b5cdf381d6b02f5048d886a8377d0042bda3af (diff)
downloadgcc-1fd508744eccda9ad9c6d6fcce5b2ea9c568818d.zip
gcc-1fd508744eccda9ad9c6d6fcce5b2ea9c568818d.tar.gz
gcc-1fd508744eccda9ad9c6d6fcce5b2ea9c568818d.tar.bz2
amdgcn: Support AMD-specific 'isa' traits in OpenMP context selectors
Add support for gfx803 as an alias for fiji. Add test cases for all supported 'isa' values. gcc/ChangeLog: * config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa): Add gfx803. * config/gcn/t-omp-device: Add gfx803. libgomp/ChangeLog: * testsuite/libgomp.c/declare-variant-4-fiji.c: New test. * testsuite/libgomp.c/declare-variant-4-gfx803.c: New test. * testsuite/libgomp.c/declare-variant-4-gfx900.c: New test. * testsuite/libgomp.c/declare-variant-4-gfx906.c: New test. * testsuite/libgomp.c/declare-variant-4-gfx908.c: New test. * testsuite/libgomp.c/declare-variant-4-gfx90a.c: New test. * testsuite/libgomp.c/declare-variant-4.h: New header file.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/gcn/gcn.cc2
-rw-r--r--gcc/config/gcn/t-omp-device2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index c74fa00..39e93ae 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -2985,7 +2985,7 @@ gcn_omp_device_kind_arch_isa (enum omp_device_kind_arch_isa trait,
case omp_device_arch:
return strcmp (name, "amdgcn") == 0 || strcmp (name, "gcn") == 0;
case omp_device_isa:
- if (strcmp (name, "fiji") == 0)
+ if (strcmp (name, "fiji") == 0 || strcmp (name, "gfx803") == 0)
return gcn_arch == PROCESSOR_FIJI;
if (strcmp (name, "gfx900") == 0)
return gcn_arch == PROCESSOR_VEGA10;
diff --git a/gcc/config/gcn/t-omp-device b/gcc/config/gcn/t-omp-device
index 27d36db..538624f 100644
--- a/gcc/config/gcn/t-omp-device
+++ b/gcc/config/gcn/t-omp-device
@@ -1,4 +1,4 @@
omp-device-properties-gcn: $(srcdir)/config/gcn/gcn.cc
echo kind: gpu > $@
echo arch: amdgcn gcn >> $@
- echo isa: fiji gfx900 gfx906 gfx908 gfx90a >> $@
+ echo isa: fiji gfx803 gfx900 gfx906 gfx908 gfx90a >> $@