Hi! On 2024-09-20T18:49:46+0200, I wrote: > We'd like to raise nvptx code generation from PTX ISA 6.0, sm_30 "Kepler" > to default PTX ISA 7.3, sm_52 "Maxwell", therefore CUDA 11.3 (2021-04). > This is, primarily, so that we're able to use 'alloca' and related stack > manipulation instructions, and improve upon the current: > > sorry ("target cannot support alloca"); > > I see, for example: > > - Ubuntu 22.04 "jammy" LTS has 11.5.1-1ubuntu1 packaged > - Debian 12 "stable" ("bookworm", 2023-06) has 11.8.89~11.8.0-5~deb12u1 > packaged
Pushed to trunk branch commit b7f168644966d451fbe46ee9d06c9763a539c41b "nvptx: For '-march=sm_52' and higher, default at least to '-mptx=7.3'", see attached, so that we'll be able to use PTX 'alloca' for sm_52+. Grüße Thomas
>From b7f168644966d451fbe46ee9d06c9763a539c41b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwi...@baylibre.com> Date: Tue, 12 Nov 2024 16:26:15 +0100 Subject: [PATCH] nvptx: For '-march=sm_52' and higher, default at least to '-mptx=7.3' PR target/65181 gcc/ * config/nvptx/nvptx.cc (default_ptx_version_option): For '-march=sm_52' and higher, default at least to '-mptx=7.3'. * doc/invoke.texi (Nvidia PTX Options): Update '-mptx=[...]'. gcc/testsuite/ * gcc.target/nvptx/march-map=sm_52.c: Adjust. * gcc.target/nvptx/march-map=sm_53.c: Likewise. * gcc.target/nvptx/march-map=sm_60.c: Likewise. * gcc.target/nvptx/march-map=sm_61.c: Likewise. * gcc.target/nvptx/march-map=sm_62.c: Likewise. * gcc.target/nvptx/march-map=sm_70.c: Likewise. * gcc.target/nvptx/march-map=sm_72.c: Likewise. * gcc.target/nvptx/march-map=sm_75.c: Likewise. * gcc.target/nvptx/march-map=sm_80.c: Likewise. * gcc.target/nvptx/march-map=sm_86.c: Likewise. * gcc.target/nvptx/march-map=sm_87.c: Likewise. * gcc.target/nvptx/march=sm_52.c: Likewise. * gcc.target/nvptx/march=sm_53.c: Likewise. * gcc.target/nvptx/march=sm_70.c: Likewise. * gcc.target/nvptx/march=sm_75.c: Likewise. * gcc.target/nvptx/march=sm_80.c: Likewise. * gcc.target/nvptx/mptx=_.c: Use '-march=sm_89'. --- gcc/config/nvptx/nvptx.cc | 4 ++++ gcc/doc/invoke.texi | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_52.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_53.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_60.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_70.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_72.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march-map=sm_75.c | 4 ++-- gcc/testsuite/gcc.target/nvptx/march-map=sm_80.c | 4 ++-- gcc/testsuite/gcc.target/nvptx/march-map=sm_86.c | 4 ++-- gcc/testsuite/gcc.target/nvptx/march-map=sm_87.c | 4 ++-- gcc/testsuite/gcc.target/nvptx/march=sm_52.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march=sm_53.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march=sm_70.c | 6 +++--- gcc/testsuite/gcc.target/nvptx/march=sm_75.c | 4 ++-- gcc/testsuite/gcc.target/nvptx/march=sm_80.c | 4 ++-- gcc/testsuite/gcc.target/nvptx/mptx=_.c | 10 +++++----- 19 files changed, 54 insertions(+), 50 deletions(-) diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index eb948d5b07e1..5860b3df6dd7 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -245,6 +245,10 @@ default_ptx_version_option (void) warp convergence. */ res = MAX (res, PTX_VERSION_6_0); + /* For sm_52+, pick at least 7.3. */ + if (ptx_isa_option >= PTX_ISA_SM52) + res = MAX (res, PTX_VERSION_7_3); + /* Verify that we pick a version that supports the sm. */ gcc_assert (first <= res); return res; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 480c48c5372a..4583181f4f53 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -30212,9 +30212,9 @@ Valid version strings are @samp{4.1}, @samp{4.2}, @samp{6.0}, @samp{6.3}, @samp{7.0}, @samp{7.3}, and @samp{7.8}. -The default PTX ISA version is 6.0, unless a higher -version is required for specified PTX ISA target architecture via -option @option{-march=}. +The default PTX ISA version is the one that added support for the +selected PTX ISA target architecture, see @option{-march=}, but at +least @samp{6.0}, or @samp{7.3} for @option{-march=sm_52} and higher. This option sets the values of the preprocessor macros @code{__PTX_ISA_VERSION_MAJOR__} and @code{__PTX_ISA_VERSION_MINOR__}; diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_52.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_52.c index f37d13a8b088..027247810ecd 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_52.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_52.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_52 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_52$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_53.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_53.c index 3fc4e00bfd5f..b0f7f20c0d85 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_53.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_53.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_53 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_60.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_60.c index 63e8355adf9e..2e83f4b5436b 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_60.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_60.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_60 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c index 6e047e63f469..742e25d5bd8e 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_61 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c index 1763835bfd5a..02ced4c0db7a 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_62 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_70.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_70.c index 7223bba664ad..f5312e396d09 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_70.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_70.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_70 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_70$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_72.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_72.c index c5e2afd600d3..21d78ba10bec 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_72.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_72.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_72 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_70$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_75.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_75.c index 3c036ab11f53..dede15998e2b 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_75.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_75.c @@ -1,10 +1,10 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_75 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_75$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_80.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_80.c index caa06796925e..fc33378d4890 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_80.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_80.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_80 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_80$} 1 } } */ #if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_86.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_86.c index 3636c899eefd..bcdab8c445fb 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_86.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_86.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_86 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_80$} 1 } } */ #if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_87.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_87.c index c298e619c678..231bdbf5219b 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_87.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_87.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march-map=sm_87 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_80$} 1 } } */ #if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_52.c b/gcc/testsuite/gcc.target/nvptx/march=sm_52.c index 515f950af475..bd21b7339779 100644 --- a/gcc/testsuite/gcc.target/nvptx/march=sm_52.c +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_52.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march=sm_52 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_52$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_53.c b/gcc/testsuite/gcc.target/nvptx/march=sm_53.c index 3155c714bc5b..befb7b3139ec 100644 --- a/gcc/testsuite/gcc.target/nvptx/march=sm_53.c +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_53.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march=sm_53 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_70.c b/gcc/testsuite/gcc.target/nvptx/march=sm_70.c index 6bde63938056..5218d1eeefcf 100644 --- a/gcc/testsuite/gcc.target/nvptx/march=sm_70.c +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_70.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march=sm_70 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_70$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_75.c b/gcc/testsuite/gcc.target/nvptx/march=sm_75.c index 2ec77ac70d3e..abffc422257f 100644 --- a/gcc/testsuite/gcc.target/nvptx/march=sm_75.c +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_75.c @@ -1,10 +1,10 @@ /* { dg-do assemble } */ /* { dg-options {-march=sm_75 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_75$} 1 } } */ -#if __PTX_ISA_VERSION_MAJOR__ != 6 +#if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_80.c b/gcc/testsuite/gcc.target/nvptx/march=sm_80.c index 024d75ece4c9..fbbb8573c54d 100644 --- a/gcc/testsuite/gcc.target/nvptx/march=sm_80.c +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_80.c @@ -1,14 +1,14 @@ /* { dg-do assemble } */ /* { dg-options {-march=sm_80 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ /* { dg-final { scan-assembler-times {(?n)^ \.target sm_80$} 1 } } */ #if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 3 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/mptx=_.c b/gcc/testsuite/gcc.target/nvptx/mptx=_.c index dcff462ba0cb..80823a03aa22 100644 --- a/gcc/testsuite/gcc.target/nvptx/mptx=_.c +++ b/gcc/testsuite/gcc.target/nvptx/mptx=_.c @@ -1,18 +1,18 @@ /* { dg-do assemble } */ -/* { dg-options {-mptx=3.1 -march=sm_80 -mptx=_} } */ +/* { dg-options {-mptx=3.1 -march=sm_89 -mptx=_} } */ /* { dg-additional-options -save-temps } */ -/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.0$} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^ \.target sm_80$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.8$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.target sm_89$} 1 } } */ #if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ #endif -#if __PTX_ISA_VERSION_MINOR__ != 0 +#if __PTX_ISA_VERSION_MINOR__ != 8 #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif -#if __PTX_SM__ != 800 +#if __PTX_SM__ != 890 #error wrong value for __PTX_SM__ #endif -- 2.34.1