]> git.ipfire.org Git - thirdparty/gcc.git/commit
Update nvptx's bitrev<mode>2 pattern to use BITREVERSE rtx.
authorRoger Sayle <roger@nextmovesoftware.com>
Wed, 7 Jun 2023 23:09:00 +0000 (00:09 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Wed, 15 Nov 2023 14:25:22 +0000 (15:25 +0100)
commit75c20a99b3a242121eef8a532f5224c00c471b56
treefda338264c9308a77356b00104a9692f01e40e81
parent61c45c055a5ccfc59463c21ab057dece822d973c
Update nvptx's bitrev<mode>2 pattern to use BITREVERSE rtx.

This minor tweak to the nvptx backend switches the representation of
of the brev instruction from an UNSPEC to instead use the new BITREVERSE
rtx.  This allows various RTL optimizations including evaluation (constant
folding) of integer constant arguments at compile-time.

gcc/
* config/nvptx/nvptx.md (UNSPEC_BITREV): Delete.
(bitrev<mode>2): Represent using bitreverse.
gcc/testsuite/
* gcc.target/nvptx/brev-2-O2.c: Adjust.
* gcc.target/nvptx/brevll-2-O2.c: Likewise.

Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
gcc/config/nvptx/nvptx.md
gcc/testsuite/gcc.target/nvptx/brev-2-O2.c
gcc/testsuite/gcc.target/nvptx/brevll-2-O2.c