Skip to content

Commit ee6711e

Browse files
committed
nvptx: Enhance '-march-map=[...]' test cases
This expands upon the one test case added in commit de0ef04 "[nvptx] Add march-map". gcc/testsuite/ * gcc.target/nvptx/march-map.c: Remove; expanded into... * gcc.target/nvptx/march-map=sm_50.c: ... this. * gcc.target/nvptx/march-map=sm_30.c: New. * 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_52.c: Likewise. * 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-map=sm_89.c: Likewise. * gcc.target/nvptx/march-map=sm_90.c: Likewise. * gcc.target/nvptx/march-map=sm_90a.c: Likewise. * gcc.target/nvptx/main.c: Remove.
1 parent ed96ce8 commit ee6711e

21 files changed

+361
-12
lines changed

gcc/testsuite/gcc.target/nvptx/main.c

Lines changed: 0 additions & 7 deletions
This file was deleted.

gcc/testsuite/gcc.target/nvptx/march-map.c

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_30 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 300
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_32 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 300
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_35 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 350
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_37 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 350
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_50 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 350
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_52 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 350
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_53 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 530
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* { dg-do assemble } */
2+
/* { dg-options {-march-map=sm_60 -mptx=_} } */
3+
/* { dg-additional-options -save-temps } */
4+
/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
5+
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */
6+
7+
#if __PTX_ISA_VERSION_MAJOR__ != 6
8+
#error wrong value for __PTX_ISA_VERSION_MAJOR__
9+
#endif
10+
11+
#if __PTX_ISA_VERSION_MINOR__ != 0
12+
#error wrong value for __PTX_ISA_VERSION_MINOR__
13+
#endif
14+
15+
#if __PTX_SM__ != 530
16+
#error wrong value for __PTX_SM__
17+
#endif
18+
19+
int dummy;

0 commit comments

Comments
 (0)