Add v2si support for nvptx
authorTom de Vries <tom@codesourcery.com>
Wed, 19 Jul 2017 13:05:21 +0000 (13:05 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 19 Jul 2017 13:05:21 +0000 (13:05 +0000)
commitb98b34b708e321a292886e2dd368223d32a60e86
treee4db190e9097d5c04e3dcdbdc2382673d54d4db5
parent1310ff035d548056ad4a0def038a6c5dedd98b47
Add v2si support for nvptx

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

* config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
(nvptx_vector_mode_supported): New function.  Allow V2SImode.
(TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
* config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
(mov<VECIM>_insn): New define_insn.
(define_expand "mov<VECIM>): New define_expand.

* gcc.target/nvptx/slp-run.c: New test.
* gcc.target/nvptx/slp.c: New test.
* gcc.target/nvptx/v2si-cvt.c: New test.
* gcc.target/nvptx/v2si-run.c: New test.
* gcc.target/nvptx/v2si.c: New test.
* gcc.target/nvptx/vec.inc: New test.

From-SVN: r250340
gcc/ChangeLog
gcc/config/nvptx/nvptx-modes.def [new file with mode: 0644]
gcc/config/nvptx/nvptx.c
gcc/config/nvptx/nvptx.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/nvptx/slp-run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/slp.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/v2si-cvt.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/v2si-run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/v2si.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/vec.inc [new file with mode: 0644]