gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602]

Improve cross-compiler handling.

gcc/ChangeLog:

	PR target/105602
	* config/gcn/t-omp-device (arch): Add 'amdgcn' besides existing 'gcn'.
	* config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa): Likewise.
This commit is contained in:
Tobias Burnus 2022-05-17 15:48:40 +02:00
parent 2c16eb3157
commit ebe5dace8c
2 changed files with 2 additions and 2 deletions

View File

@ -2632,7 +2632,7 @@ gcn_omp_device_kind_arch_isa (enum omp_device_kind_arch_isa trait,
case omp_device_kind:
return strcmp (name, "gpu") == 0;
case omp_device_arch:
return strcmp (name, "gcn") == 0;
return strcmp (name, "amdgcn") == 0 || strcmp (name, "gcn") == 0;
case omp_device_isa:
if (strcmp (name, "fiji") == 0)
return gcn_arch == PROCESSOR_FIJI;

View File

@ -1,4 +1,4 @@
omp-device-properties-gcn: $(srcdir)/config/gcn/gcn.cc
echo kind: gpu > $@
echo arch: gcn >> $@
echo arch: amdgcn gcn >> $@
echo isa: fiji gfx900 gfx906 gfx908 >> $@