Hi! On 2022-03-29T16:17:43+0200, Tom de Vries via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > [...] > > gcc/testsuite/ChangeLog: > > 2022-03-29 Tom de Vries <tdevr...@suse.de> > > PR target/104857 > * gcc.target/nvptx/ptx31.c: New test. > * gcc.target/nvptx/ptx60.c: New test. > * gcc.target/nvptx/ptx63.c: New test. > * gcc.target/nvptx/ptx70.c: New test.
Pushed to trunk branch commit b7abc7cabdbcc889a74cde1cdc1ffb27cf965128 "nvptx: Enhance '-mptx=[...]' test cases", see attached. Grüße Thomas
>From b7abc7cabdbcc889a74cde1cdc1ffb27cf965128 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwi...@baylibre.com> Date: Sun, 10 Nov 2024 20:01:58 +0100 Subject: [PATCH] nvptx: Enhance '-mptx=[...]' test cases This expands upon the test cases added in commit a2eacdbd4c4a698b3b6f27ef5e1f8dd3d836b2e5 "[nvptx] Add __PTX_ISA_VERSION_{MAJOR,MINOR}__". gcc/testsuite/ * gcc.target/nvptx/ptx31.c: Remove; expanded into... * gcc.target/nvptx/mptx=3.1.c: ... this. * gcc.target/nvptx/ptx60.c: Remove; expanded into... * gcc.target/nvptx/mptx=6.0.c: ... this. * gcc.target/nvptx/ptx63.c: Remove; expanded into... * gcc.target/nvptx/mptx=6.3.c: ... this. * gcc.target/nvptx/ptx70.c: Remove; expanded into... * gcc.target/nvptx/mptx=7.0.c: ... this. * gcc.target/nvptx/mptx=_.c: New. --- gcc/testsuite/gcc.target/nvptx/mptx=3.1.c | 19 +++++++++++++++++++ gcc/testsuite/gcc.target/nvptx/mptx=6.0.c | 19 +++++++++++++++++++ gcc/testsuite/gcc.target/nvptx/mptx=6.3.c | 19 +++++++++++++++++++ gcc/testsuite/gcc.target/nvptx/mptx=7.0.c | 19 +++++++++++++++++++ gcc/testsuite/gcc.target/nvptx/mptx=_.c | 19 +++++++++++++++++++ gcc/testsuite/gcc.target/nvptx/ptx31.c | 10 ---------- gcc/testsuite/gcc.target/nvptx/ptx60.c | 10 ---------- gcc/testsuite/gcc.target/nvptx/ptx63.c | 10 ---------- gcc/testsuite/gcc.target/nvptx/ptx70.c | 10 ---------- 9 files changed, 95 insertions(+), 40 deletions(-) create mode 100644 gcc/testsuite/gcc.target/nvptx/mptx=3.1.c create mode 100644 gcc/testsuite/gcc.target/nvptx/mptx=6.0.c create mode 100644 gcc/testsuite/gcc.target/nvptx/mptx=6.3.c create mode 100644 gcc/testsuite/gcc.target/nvptx/mptx=7.0.c create mode 100644 gcc/testsuite/gcc.target/nvptx/mptx=_.c delete mode 100644 gcc/testsuite/gcc.target/nvptx/ptx31.c delete mode 100644 gcc/testsuite/gcc.target/nvptx/ptx60.c delete mode 100644 gcc/testsuite/gcc.target/nvptx/ptx63.c delete mode 100644 gcc/testsuite/gcc.target/nvptx/ptx70.c diff --git a/gcc/testsuite/gcc.target/nvptx/mptx=3.1.c b/gcc/testsuite/gcc.target/nvptx/mptx=3.1.c new file mode 100644 index 000000000000..30e244761ac7 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/mptx=3.1.c @@ -0,0 +1,19 @@ +/* { dg-do assemble } */ +/* { dg-options {-march=sm_30 -mptx=3.1} } */ +/* { dg-additional-options -save-temps } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 3\.1$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */ + +#if __PTX_ISA_VERSION_MAJOR__ != 3 +#error wrong value for __PTX_ISA_VERSION_MAJOR__ +#endif + +#if __PTX_ISA_VERSION_MINOR__ != 1 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 300 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/mptx=6.0.c b/gcc/testsuite/gcc.target/nvptx/mptx=6.0.c new file mode 100644 index 000000000000..6877438fe653 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/mptx=6.0.c @@ -0,0 +1,19 @@ +/* { dg-do assemble } */ +/* { dg-options {-march=sm_30 -mptx=6.0} } */ +/* { dg-additional-options -save-temps } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 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 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 300 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/mptx=6.3.c b/gcc/testsuite/gcc.target/nvptx/mptx=6.3.c new file mode 100644 index 000000000000..e997840eabd0 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/mptx=6.3.c @@ -0,0 +1,19 @@ +/* { dg-do assemble } */ +/* { dg-options {-march=sm_30 -mptx=6.3} } */ +/* { dg-additional-options -save-temps } */ +/* { 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__ != 3 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 300 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/mptx=7.0.c b/gcc/testsuite/gcc.target/nvptx/mptx=7.0.c new file mode 100644 index 000000000000..c14c03e21866 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/mptx=7.0.c @@ -0,0 +1,19 @@ +/* { dg-do assemble } */ +/* { dg-options {-march=sm_30 -mptx=7.0} } */ +/* { dg-additional-options -save-temps } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */ + +#if __PTX_ISA_VERSION_MAJOR__ != 7 +#error wrong value for __PTX_ISA_VERSION_MAJOR__ +#endif + +#if __PTX_ISA_VERSION_MINOR__ != 0 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 300 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/mptx=_.c b/gcc/testsuite/gcc.target/nvptx/mptx=_.c new file mode 100644 index 000000000000..dcff462ba0cb --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/mptx=_.c @@ -0,0 +1,19 @@ +/* { dg-do assemble } */ +/* { dg-options {-mptx=3.1 -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)^ \.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 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 800 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/ptx31.c b/gcc/testsuite/gcc.target/nvptx/ptx31.c deleted file mode 100644 index 46b5e1ba4054..000000000000 --- a/gcc/testsuite/gcc.target/nvptx/ptx31.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-march=sm_30 -mptx=3.1" } */ - -#if __PTX_ISA_VERSION_MAJOR__ != 3 -#error wrong value for __PTX_ISA_VERSION_MAJOR__ -#endif - -#if __PTX_ISA_VERSION_MINOR__ != 1 -#error wrong value for __PTX_ISA_VERSION_MINOR__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/ptx60.c b/gcc/testsuite/gcc.target/nvptx/ptx60.c deleted file mode 100644 index 267a9c64f1e9..000000000000 --- a/gcc/testsuite/gcc.target/nvptx/ptx60.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-march=sm_30 -mptx=6.0" } */ - -#if __PTX_ISA_VERSION_MAJOR__ != 6 -#error wrong value for __PTX_ISA_VERSION_MAJOR__ -#endif - -#if __PTX_ISA_VERSION_MINOR__ != 0 -#error wrong value for __PTX_ISA_VERSION_MINOR__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/ptx63.c b/gcc/testsuite/gcc.target/nvptx/ptx63.c deleted file mode 100644 index 13d02e132aea..000000000000 --- a/gcc/testsuite/gcc.target/nvptx/ptx63.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-march=sm_30 -mptx=6.3" } */ - -#if __PTX_ISA_VERSION_MAJOR__ != 6 -#error wrong value for __PTX_ISA_VERSION_MAJOR__ -#endif - -#if __PTX_ISA_VERSION_MINOR__ != 3 -#error wrong value for __PTX_ISA_VERSION_MINOR__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/ptx70.c b/gcc/testsuite/gcc.target/nvptx/ptx70.c deleted file mode 100644 index 15df13604bd6..000000000000 --- a/gcc/testsuite/gcc.target/nvptx/ptx70.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-march=sm_30 -mptx=7.0" } */ - -#if __PTX_ISA_VERSION_MAJOR__ != 7 -#error wrong value for __PTX_ISA_VERSION_MAJOR__ -#endif - -#if __PTX_ISA_VERSION_MINOR__ != 0 -#error wrong value for __PTX_ISA_VERSION_MINOR__ -#endif -- 2.34.1