From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id 48EBD38582A1; Fri, 26 Jan 2024 14:12:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 48EBD38582A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706278328; bh=a8FsKS1G1t1udWeHTcKA3ftCCfaDNyZI8mf8CoDresU=; h=From:To:Subject:Date:From; b=J/YnCkI01rdCuOOJD0U1xzpUmfFvy2O/I1o/XeuNrnVlzCtAoh9svs7m9iT1JJrhB QoRyLCcLt34KTDeJl4EuODm5/XKCN0DSfL6E3Xqm8bL6srV109xwerRo2+18G8zXGL BuLy3wJvB/BeJo5GlKd4mDjGyq6cIQYdAW0q8BBk= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8453] amdgcn: config.gcc - enable gfx1030 and gfx1100 multilib; add them to the docs X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/master X-Git-Oldrev: 99890e15527f1f04caef95ecdd135c9f1a077f08 X-Git-Newrev: 56d0aba11abe22455f1deffa9eda59f4908453de Message-Id: <20240126141208.48EBD38582A1@sourceware.org> Date: Fri, 26 Jan 2024 14:12:08 +0000 (GMT) List-Id: https://gcc.gnu.org/g:56d0aba11abe22455f1deffa9eda59f4908453de commit r14-8453-g56d0aba11abe22455f1deffa9eda59f4908453de Author: Tobias Burnus Date: Fri Jan 26 15:11:09 2024 +0100 amdgcn: config.gcc - enable gfx1030 and gfx1100 multilib; add them to the docs gcc/ChangeLog: * config.gcc (amdgcn-*-*): Add gfx1030 and gfx1100 to TM_MULTILIB_CONFIG. * doc/install.texi (Configuration amdgcn-*-*): Mention gfx1030/gfx1100. * doc/invoke.texi (AMD GCN Options): Add gfx1030 and gfx1100 to -march/-mtune. libgomp/ChangeLog: * testsuite/libgomp.c/declare-variant-4.h: Add variant functions for gfx1030 and gfx1100. * testsuite/libgomp.c/declare-variant-4-gfx1030.c: New test. * testsuite/libgomp.c/declare-variant-4-gfx1100.c: New test. Signed-off-by: Tobias Burnus Diff: --- gcc/config.gcc | 2 +- gcc/doc/install.texi | 12 ++++++------ gcc/doc/invoke.texi | 6 ++++++ libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c | 8 ++++++++ libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c | 8 ++++++++ libgomp/testsuite/libgomp.c/declare-variant-4.h | 16 ++++++++++++++++ 6 files changed, 45 insertions(+), 7 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index b2d7d7dd4754..a0f9c6723083 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4564,7 +4564,7 @@ case "${target}" in TM_MULTILIB_CONFIG= ;; xdefault | xyes) - TM_MULTILIB_CONFIG=`echo "gfx900,gfx906,gfx908,gfx90a" | sed "s/${with_arch},\?//;s/,$//"` + TM_MULTILIB_CONFIG=`echo "gfx900,gfx906,gfx908,gfx90a,gfx1030,gfx1100" | sed "s/${with_arch},\?//;s/,$//"` ;; *) TM_MULTILIB_CONFIG="${with_multilib_list}" diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 715939193898..5747b5a12fe8 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1258,12 +1258,12 @@ default set of libraries is selected based on the value of @item amdgcn*-*-* @var{list} is a comma separated list of ISA names (allowed values: @code{fiji}, -@code{gfx900}, @code{gfx906}, @code{gfx908}, @code{gfx90a}). It ought not -include the name of the default ISA, specified via @option{--with-arch}. If -@var{list} is empty, then there will be no multilibs and only the default -run-time library will be built. If @var{list} is @code{default} or -@option{--with-multilib-list=} is not specified, then the default set of -libraries is selected. +@code{gfx900}, @code{gfx906}, @code{gfx908}, @code{gfx90a}, @code{gfx1030}, +@code{gfx1100}). It ought not include the name of the default ISA, specified +via @option{--with-arch}. If @var{list} is empty, then there will be no +multilibs and only the default run-time library will be built. If @var{list} +is @code{default} or @option{--with-multilib-list=} is not specified, then +the default set of libraries is selected. @item arm*-*-* @var{list} is a comma separated list of @code{aprofile} and diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 6ec56493e59c..64c5ed2ffde2 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21739,6 +21739,12 @@ Compile for CDNA1 Instinct MI100 series devices (gfx908). @item gfx90a Compile for CDNA2 Instinct MI200 series devices (gfx90a). +@item gfx1030 +Compile for RDNA2 gfx1030 devices (GFX10 series). + +@item gfx1100 +Compile for RDNA3 gfx1100 devices (GFX11 series). + @end table @opindex msram-ecc diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c new file mode 100644 index 000000000000..d98d5ef54ec7 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c @@ -0,0 +1,8 @@ +/* { dg-do link { target { offload_target_amdgcn } } } */ +/* { dg-additional-options -foffload=amdgcn-amdhsa } */ +/* { dg-additional-options -foffload=-march=gfx1030 } */ +/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */ + +#include "declare-variant-4.h" + +/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1030 \\(\\);" "optimized" } } */ diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c new file mode 100644 index 000000000000..6ade35224cc4 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c @@ -0,0 +1,8 @@ +/* { dg-do link { target { offload_target_amdgcn } } } */ +/* { dg-additional-options -foffload=amdgcn-amdhsa } */ +/* { dg-additional-options -foffload=-march=gfx1100 } */ +/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */ + +#include "declare-variant-4.h" + +/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1100 \\(\\);" "optimized" } } */ diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4.h b/libgomp/testsuite/libgomp.c/declare-variant-4.h index a70352430c27..393a5e295cce 100644 --- a/libgomp/testsuite/libgomp.c/declare-variant-4.h +++ b/libgomp/testsuite/libgomp.c/declare-variant-4.h @@ -35,6 +35,20 @@ gfx90a (void) return 0x90a; } +__attribute__ ((noipa)) +int +gfx1030 (void) +{ + return 0x1030; +} + +__attribute__ ((noipa)) +int +gfx1100 (void) +{ + return 0x1100; +} + #ifdef USE_FIJI_FOR_GFX803 #pragma omp declare variant(gfx803) match(device = {isa("fiji")}) #else @@ -44,6 +58,8 @@ gfx90a (void) #pragma omp declare variant(gfx906) match(device = {isa("gfx906")}) #pragma omp declare variant(gfx908) match(device = {isa("gfx908")}) #pragma omp declare variant(gfx90a) match(device = {isa("gfx90a")}) +#pragma omp declare variant(gfx90a) match(device = {isa("gfx1030")}) +#pragma omp declare variant(gfx90a) match(device = {isa("gfx1100")}) __attribute__ ((noipa)) int f (void)