Message ID | 20220329105811.GA15140@delia.home |
---|---|
State | New |
Headers | show |
Series | [committed,nvptx] Add march alias for misa | expand |
diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt index 1f684ed8860..b5d0170e9e9 100644 --- a/gcc/config/nvptx/nvptx.opt +++ b/gcc/config/nvptx/nvptx.opt @@ -56,6 +56,10 @@ misa= Target RejectNegative ToLower Joined Enum(ptx_isa) Var(ptx_isa_option) Init(PTX_ISA_SM30) Specify the PTX ISA target architecture to use. +march= +Target RejectNegative Joined Alias(misa=) +Alias: + Enum Name(ptx_version) Type(int) Known PTX ISA versions (for use with the -mptx= option): diff --git a/gcc/testsuite/gcc.target/nvptx/main.c b/gcc/testsuite/gcc.target/nvptx/main.c new file mode 100644 index 00000000000..3af2b575842 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/main.c @@ -0,0 +1,7 @@ +/* { dg-do link } */ + +int +main (void) +{ + return 0; +} diff --git a/gcc/testsuite/gcc.target/nvptx/march.c b/gcc/testsuite/gcc.target/nvptx/march.c new file mode 100644 index 00000000000..ec91f21c903 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march.c @@ -0,0 +1,5 @@ +/* { dg-options "-march=sm_30"} */ + +#include "main.c" + +/* { dg-final { scan-assembler-times "\\.target\tsm_30" 1 } } */