Add v2si 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: 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_insn): New define_insn. (define_expand "mov): 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.

fcac805 Add v2si support for nvptx
gcc/ChangeLog | 10 ++++
gcc/config/nvptx/nvptx-modes.def | 1 +
gcc/config/nvptx/nvptx.c | 12 +++++
gcc/config/nvptx/nvptx.md | 29 +++++++++++
gcc/testsuite/ChangeLog | 9 ++++
gcc/testsuite/gcc.target/nvptx/slp-run.c | 23 +++++++++
gcc/testsuite/gcc.target/nvptx/slp.c | 25 ++++++++++
gcc/testsuite/gcc.target/nvptx/v2si-cvt.c | 39 +++++++++++++++
gcc/testsuite/gcc.target/nvptx/v2si-run.c | 83 +++++++++++++++++++++++++++++++
gcc/testsuite/gcc.target/nvptx/v2si.c | 12 +++++
gcc/testsuite/gcc.target/nvptx/vec.inc | 18 +++++++
11 files changed, 261 insertions(+)

Upstream: gcc.gnu.org


  • Share