gcc/
* config/nvptx/nvptx.cc (default_ptx_version_option): Default at
least to '-mptx=6.3'.
* doc/invoke.texi (Nvidia PTX Options): Update '-mptx=[...]'.
gcc/testsuite/
* gcc.target/nvptx/march-map=sm_30.c: Adjust.
* gcc.target/nvptx/march-map=sm_32.c: Likewise.
* gcc.target/nvptx/march-map=sm_35.c: Likewise.
* gcc.target/nvptx/march-map=sm_37.c: Likewise.
* gcc.target/nvptx/march-map=sm_50.c: Likewise.
* gcc.target/nvptx/march=sm_30.c: Likewise.
* gcc.target/nvptx/march=sm_35.c: Likewise.
* gcc.target/nvptx/march=sm_37.c: Likewise.
(cherry picked from commit
5450afcfb761834b7f4156022f1ec38f2226c193)
+2025-03-25 Thomas Schwinge <tschwinge@baylibre.com>
+
+ Backported from trunk:
+ 2025-03-24 Thomas Schwinge <tschwinge@baylibre.com>
+
+ * config/nvptx/nvptx.cc (default_ptx_version_option): Default at
+ least to '-mptx=6.3'.
+ * doc/invoke.texi (Nvidia PTX Options): Update '-mptx=[...]'.
+
2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
Backported from master:
warp convergence. */
res = MAX (res, PTX_VERSION_6_0);
+ /* Pick at least 6.3. */
+ res = MAX (res, PTX_VERSION_6_3);
+
/* For sm_52+, pick at least 7.3, to enable PTX 'alloca'. */
if (ptx_isa_option >= PTX_ISA_SM52)
res = MAX (res, PTX_VERSION_7_3);
@samp{7.0}, @samp{7.3}, and @samp{7.8}.
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.
+least @samp{6.3}, 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__};
2025-03-25 Thomas Schwinge <tschwinge@baylibre.com>
+ Backported from trunk:
+ 2025-03-24 Thomas Schwinge <tschwinge@baylibre.com>
+
+ * gcc.target/nvptx/march-map=sm_30.c: Adjust.
+ * gcc.target/nvptx/march-map=sm_32.c: Likewise.
+ * gcc.target/nvptx/march-map=sm_35.c: Likewise.
+ * gcc.target/nvptx/march-map=sm_37.c: Likewise.
+ * gcc.target/nvptx/march-map=sm_50.c: Likewise.
+ * gcc.target/nvptx/march=sm_30.c: Likewise.
+ * gcc.target/nvptx/march=sm_35.c: Likewise.
+ * gcc.target/nvptx/march=sm_37.c: Likewise.
+
Backported from trunk:
2025-03-21 Thomas Schwinge <tschwinge@baylibre.com>
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_30 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_32 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_35 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_37 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_37$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_50 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_37$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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
/* { dg-do assemble } */
/* { dg-options {-march=sm_30 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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
/* { dg-do assemble } */
/* { dg-options {-march=sm_35 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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
/* { dg-do assemble } */
/* { dg-options {-march=sm_37 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_37$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#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