public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602]
@ 2022-07-04 20:11 Tobias Burnus
  0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2022-07-04 20:11 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d02972a2dab719f00520ab07476d11340cf76192

commit d02972a2dab719f00520ab07476d11340cf76192
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Mon Jul 4 21:42:42 2022 +0200

    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.
    
    (cherry picked from commit ebe5dace8c318b38f42cfe1d148e90dcdfadb31e)

Diff:
---
 gcc/ChangeLog.omp           | 9 +++++++++
 gcc/config/gcn/gcn.cc       | 2 +-
 gcc/config/gcn/t-omp-device | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index 1c4634d09ab..e146e14e6f8 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,12 @@
+2022-07-04  Tobias Burnus  <tobias@codesourcery.com>
+
+	Backport from mainline:
+	2022-05-17  Tobias Burnus  <tobias@codesourcery.com>
+
+	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.
+
 2022-07-04  Tobias Burnus  <tobias@codesourcery.com>
 
 	Backport from mainline:
diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 98e56305436..d963231fd50 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -2667,7 +2667,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;
diff --git a/gcc/config/gcn/t-omp-device b/gcc/config/gcn/t-omp-device
index 1086cefb0a2..27d36db894b 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: gcn >> $@
+	echo arch: amdgcn gcn >> $@
 	echo isa: fiji gfx900 gfx906 gfx908 gfx90a >> $@


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-04 20:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 20:11 [gcc/devel/omp/gcc-12] gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602] Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).