diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2024-11-10 20:09:42 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2024-12-06 11:36:45 +0100 |
commit | ed96ce81b19b76ba6a5edfe68dd86d8ea319c6d9 (patch) | |
tree | 5804789a9f62987797f45ad4f092d4f0d1e05fad /gcc | |
parent | b7abc7cabdbcc889a74cde1cdc1ffb27cf965128 (diff) | |
download | gcc-ed96ce81b19b76ba6a5edfe68dd86d8ea319c6d9.zip gcc-ed96ce81b19b76ba6a5edfe68dd86d8ea319c6d9.tar.gz gcc-ed96ce81b19b76ba6a5edfe68dd86d8ea319c6d9.tar.bz2 |
nvptx: Enhance '-march=[...]' test cases
This expands upon the test cases added in
commit 4706670cd3b06bb024da0683776bf86c79d55940
"[nvptx, testsuite] Add gcc.target/nvptx/sm*.c".
gcc/testsuite/
* gcc.target/nvptx/sm30.c: Remove; expanded into...
* gcc.target/nvptx/march=sm_30.c: ... this.
* gcc.target/nvptx/sm35.c: Remove; expanded into...
* gcc.target/nvptx/march=sm_35.c: ... this.
* gcc.target/nvptx/sm53.c: Remove; expanded into...
* gcc.target/nvptx/march=sm_53.c: ... this.
* gcc.target/nvptx/sm70.c: Remove; expanded into...
* gcc.target/nvptx/march=sm_70.c: ... this.
* gcc.target/nvptx/sm75.c: Remove; expanded into...
* gcc.target/nvptx/march=sm_75.c: ... this.
* gcc.target/nvptx/sm80.c: Remove; expanded into...
* gcc.target/nvptx/march=sm_80.c: ... this.
* gcc.target/nvptx/march.c: Remove.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/march.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/march=sm_30.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/march=sm_35.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/march=sm_53.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/march=sm_70.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/march=sm_75.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/march=sm_80.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/sm30.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/sm35.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/sm53.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/sm70.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/sm75.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/nvptx/sm80.c | 6 |
13 files changed, 114 insertions, 41 deletions
diff --git a/gcc/testsuite/gcc.target/nvptx/march.c b/gcc/testsuite/gcc.target/nvptx/march.c deleted file mode 100644 index d1dd715..0000000 --- a/gcc/testsuite/gcc.target/nvptx/march.c +++ /dev/null @@ -1,5 +0,0 @@ -/* { dg-options "-march=sm_30" } */ - -#include "main.c" - -/* { dg-final { scan-assembler-times "\\.target\tsm_30" 1 } } */ diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_30.c b/gcc/testsuite/gcc.target/nvptx/march=sm_30.c new file mode 100644 index 0000000..a362935 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_30.c @@ -0,0 +1,19 @@ +/* { 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)^ \.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/march=sm_35.c b/gcc/testsuite/gcc.target/nvptx/march=sm_35.c new file mode 100644 index 0000000..c9e9226 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_35.c @@ -0,0 +1,19 @@ +/* { 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)^ \.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 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 350 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_53.c b/gcc/testsuite/gcc.target/nvptx/march=sm_53.c new file mode 100644 index 0000000..3155c71 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_53.c @@ -0,0 +1,19 @@ +/* { 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)^ \.target sm_53$} 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__ != 530 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_70.c b/gcc/testsuite/gcc.target/nvptx/march=sm_70.c new file mode 100644 index 0000000..6bde639 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_70.c @@ -0,0 +1,19 @@ +/* { 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)^ \.target sm_70$} 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__ != 700 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_75.c b/gcc/testsuite/gcc.target/nvptx/march=sm_75.c new file mode 100644 index 0000000..2ec77ac --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_75.c @@ -0,0 +1,19 @@ +/* { 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)^ \.target sm_75$} 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__ != 750 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_80.c b/gcc/testsuite/gcc.target/nvptx/march=sm_80.c new file mode 100644 index 0000000..024d75e --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_80.c @@ -0,0 +1,19 @@ +/* { 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)^ \.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/sm30.c b/gcc/testsuite/gcc.target/nvptx/sm30.c deleted file mode 100644 index 4b35317..0000000 --- a/gcc/testsuite/gcc.target/nvptx/sm30.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-misa=sm_30" } */ - -#if __PTX_SM__ != 300 -#error wrong value for __PTX_SM__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/sm35.c b/gcc/testsuite/gcc.target/nvptx/sm35.c deleted file mode 100644 index ff3d179..0000000 --- a/gcc/testsuite/gcc.target/nvptx/sm35.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-misa=sm_35" } */ - -#if __PTX_SM__ != 350 -#error wrong value for __PTX_SM__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/sm53.c b/gcc/testsuite/gcc.target/nvptx/sm53.c deleted file mode 100644 index b4d819c..0000000 --- a/gcc/testsuite/gcc.target/nvptx/sm53.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-misa=sm_53 -mptx=_" } */ - -#if __PTX_SM__ != 530 -#error wrong value for __PTX_SM__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/sm70.c b/gcc/testsuite/gcc.target/nvptx/sm70.c deleted file mode 100644 index 4bd012b..0000000 --- a/gcc/testsuite/gcc.target/nvptx/sm70.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-misa=sm_70 -mptx=_" } */ - -#if __PTX_SM__ != 700 -#error wrong value for __PTX_SM__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/sm75.c b/gcc/testsuite/gcc.target/nvptx/sm75.c deleted file mode 100644 index d159d3f..0000000 --- a/gcc/testsuite/gcc.target/nvptx/sm75.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-misa=sm_75 -mptx=_" } */ - -#if __PTX_SM__ != 750 -#error wrong value for __PTX_SM__ -#endif diff --git a/gcc/testsuite/gcc.target/nvptx/sm80.c b/gcc/testsuite/gcc.target/nvptx/sm80.c deleted file mode 100644 index ef6d8b7..0000000 --- a/gcc/testsuite/gcc.target/nvptx/sm80.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-misa=sm_80 -mptx=_" } */ - -#if __PTX_SM__ != 800 -#error wrong value for __PTX_SM__ -#endif |