nvptx: Support 16-bit shifts and extendqihi2
authorTom de Vries <tdevries@suse.de>
Tue, 28 Jul 2020 13:13:54 +0000 (15:13 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 28 Jul 2020 13:13:54 +0000 (15:13 +0200)
commit862a58ed83c681efd2724db2b71294fc71196b73
tree70be495c5a7627e93fea0122eb13fac9d544d595
parent134051f16bd490ada9febb7511a202b34b1821f3
nvptx: Support 16-bit shifts and extendqihi2

Add support for 16-bits shifts and for sign extension from 8 bits to
16 bits.

This patch has been tested on nvptx-none with no new regressions.

2020-07-28  Roger Sayle  <roger@nextmovesoftware.com>
    Tom de Vries  <tdevries@suse.de>

gcc/ChangeLog:

* config/nvptx/nvptx.md (extendqihi2): New instruction.
(ashl<mode>3, ashr<mode>3, lshr<mode>3): Support HImode.

gcc/testsuite/ChangeLog:

* gcc.target/nvptx/cvt.c: New test.
* gcc.target/nvptx/shift16.c: New test.
gcc/config/nvptx/nvptx.md
gcc/testsuite/gcc.target/nvptx/cvt.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/shift16.c [new file with mode: 0644]