Add v2di support for nvptx

Programming / Compilers / GCC - vries [138bc75d-0d04-0410-961f-82ee72b054a4] - 19 July 2017 09:05 EDT

2017-07-19 Tom de Vries

- config/nvptx/nvptx-modes.def: Add V2DImode.
- config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
- config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode. (nvptx_output_mov_insn): Handle lack of mov.b128. (nvptx_print_operand): Handle 'H' and 'L' codes. (nvptx_vector_mode_supported): Allow V2DImode. (nvptx_preferred_simd_mode): New function. (nvptx_data_alignment): New function. (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to nvptx_preferred_simd_mode.
- config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from 64 to 128 bits. (DATA_ALIGNMENT): Define. Set to nvptx_data_alignment.

- config/nvptx/nvptx.md (VECIM): Add V2DI.

- gcc.target/nvptx/decl-init.c: Update alignment.
- gcc.target/nvptx/slp-2-run.c: New test.
- gcc.target/nvptx/slp-2.c: New test.
- gcc.target/nvptx/v2di.c: New test.

- testsuite/libgomp.oacc-c/vec.c: New test.

ffaae5b Add v2di support for nvptx
gcc/ChangeLog | 20 +++++++++
gcc/config/nvptx/nvptx-modes.def | 2 +
gcc/config/nvptx/nvptx-protos.h | 1 +
gcc/config/nvptx/nvptx.c | 68 +++++++++++++++++++++++++++++-
gcc/config/nvptx/nvptx.h | 6 ++-
gcc/config/nvptx/nvptx.md | 2 +-
gcc/testsuite/ChangeLog | 7 +++
gcc/testsuite/gcc.target/nvptx/decl-init.c | 2 +-
gcc/testsuite/gcc.target/nvptx/slp-2-run.c | 23 ++++++++++
gcc/testsuite/gcc.target/nvptx/slp-2.c | 25 +++++++++++
gcc/testsuite/gcc.target/nvptx/v2di.c | 12 ++++++
libgomp/ChangeLog | 4 ++
libgomp/testsuite/libgomp.oacc-c/vec.c | 48 +++++++++++++++++++++
13 files changed, 214 insertions(+), 6 deletions(-)

Upstream: gcc.gnu.org


  • Share