nvptx: Enhance '-march=[...]' test cases
This expands upon the test cases added in
commit 4706670cd3
"[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.
This commit is contained in:
parent
b7abc7cabd
commit
ed96ce81b1
13 changed files with 114 additions and 41 deletions
|
@ -1,5 +0,0 @@
|
|||
/* { dg-options "-march=sm_30" } */
|
||||
|
||||
#include "main.c"
|
||||
|
||||
/* { dg-final { scan-assembler-times "\\.target\tsm_30" 1 } } */
|
19
gcc/testsuite/gcc.target/nvptx/march=sm_30.c
Normal file
19
gcc/testsuite/gcc.target/nvptx/march=sm_30.c
Normal file
|
@ -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;
|
19
gcc/testsuite/gcc.target/nvptx/march=sm_35.c
Normal file
19
gcc/testsuite/gcc.target/nvptx/march=sm_35.c
Normal file
|
@ -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;
|
19
gcc/testsuite/gcc.target/nvptx/march=sm_53.c
Normal file
19
gcc/testsuite/gcc.target/nvptx/march=sm_53.c
Normal file
|
@ -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;
|
19
gcc/testsuite/gcc.target/nvptx/march=sm_70.c
Normal file
19
gcc/testsuite/gcc.target/nvptx/march=sm_70.c
Normal file
|
@ -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;
|
19
gcc/testsuite/gcc.target/nvptx/march=sm_75.c
Normal file
19
gcc/testsuite/gcc.target/nvptx/march=sm_75.c
Normal file
|
@ -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;
|
19
gcc/testsuite/gcc.target/nvptx/march=sm_80.c
Normal file
19
gcc/testsuite/gcc.target/nvptx/march=sm_80.c
Normal file
|
@ -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;
|
|
@ -1,6 +0,0 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-misa=sm_30" } */
|
||||
|
||||
#if __PTX_SM__ != 300
|
||||
#error wrong value for __PTX_SM__
|
||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-misa=sm_35" } */
|
||||
|
||||
#if __PTX_SM__ != 350
|
||||
#error wrong value for __PTX_SM__
|
||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-misa=sm_53 -mptx=_" } */
|
||||
|
||||
#if __PTX_SM__ != 530
|
||||
#error wrong value for __PTX_SM__
|
||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-misa=sm_70 -mptx=_" } */
|
||||
|
||||
#if __PTX_SM__ != 700
|
||||
#error wrong value for __PTX_SM__
|
||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-misa=sm_75 -mptx=_" } */
|
||||
|
||||
#if __PTX_SM__ != 750
|
||||
#error wrong value for __PTX_SM__
|
||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-misa=sm_80 -mptx=_" } */
|
||||
|
||||
#if __PTX_SM__ != 800
|
||||
#error wrong value for __PTX_SM__
|
||||
#endif
|
Loading…
Add table
Reference in a new issue