]> gcc.gnu.org Git - gcc.git/commit
Fix PR 106600: __builtin_bswap32 is not hooked up for ZBB for 32bit
authorAndrew Pinski <apinski@marvell.com>
Fri, 19 Aug 2022 17:01:02 +0000 (17:01 +0000)
committerAndrew Pinski <apinski@marvell.com>
Wed, 24 Aug 2022 18:30:30 +0000 (11:30 -0700)
commitcb2daf5acce003300ee948a89860c0d13ebcae79
tree9fdda731ff892230b69b1e09b1f20590f7af6546
parent55d8c5409325001c89c35c3d04d425dec9127146
Fix PR 106600: __builtin_bswap32 is not hooked up for ZBB for 32bit

The problem here is the bswap<mode>2 pattern had a check for TARGET_64BIT
but then used the X iterator. Since the X iterator is either SI or DI depending
on the setting TARGET_64BIT, there is no reason for the TARGET_64BIT.

OK? Built and tested on both riscv32-linux-gnu and riscv64-linux-gnu.

Thanks,
Andrew Pinski

gcc/ChangeLog:

PR target/106600
* config/riscv/bitmanip.md (bswap<mode>2): Remove
condition on TARGET_64BIT as X is already conditional there.

gcc/testsuite/ChangeLog:

PR target/106600
* gcc.target/riscv/zbb_32_bswap-1.c: New test.
* gcc.target/riscv/zbb_bswap-1.c: New test.
gcc/config/riscv/bitmanip.md
gcc/testsuite/gcc.target/riscv/zbb_32_bswap-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/zbb_bswap-1.c [new file with mode: 0644]
This page took 0.065627 seconds and 6 git commands to generate.