Add v2di support for nvptx
authorTom de Vries <tom@codesourcery.com>
Wed, 19 Jul 2017 13:05:35 +0000 (13:05 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 19 Jul 2017 13:05:35 +0000 (13:05 +0000)
commit3717fbe35e288a02ddf97367355b15530745cecb
tree62be9cc7eb642cfb779faad19c47eb9021e2f1fc
parentb98b34b708e321a292886e2dd368223d32a60e86
Add v2di support for nvptx

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* 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.

From-SVN: r250341
13 files changed:
gcc/ChangeLog
gcc/config/nvptx/nvptx-modes.def
gcc/config/nvptx/nvptx-protos.h
gcc/config/nvptx/nvptx.c
gcc/config/nvptx/nvptx.h
gcc/config/nvptx/nvptx.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/nvptx/decl-init.c
gcc/testsuite/gcc.target/nvptx/slp-2-run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/slp-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/v2di.c [new file with mode: 0644]
libgomp/ChangeLog
libgomp/testsuite/libgomp.oacc-c/vec.c [new file with mode: 0644]