RISC-V: Fix splitter for 32-bit AND on 64-bit target.
commitace4317affd3068cc01c06f0928e119f1559519c
authorJim Wilson <wilson@gcc.gnu.org>
Mon, 8 Jul 2019 10:47:42 +0000 (8 03:47 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 8 Jul 2019 10:47:42 +0000 (8 03:47 -0700)
tree5e081375e6187acc9e6ffcdb8c59218a4a0b2abb
parentce79110f01f445d97a32f93cc53c346cf98a5425
RISC-V: Fix splitter for 32-bit AND on 64-bit target.

Fixes github.com/riscv/riscv-gcc issue #161.  We were accidentally using
BITS_PER_WORD to compute shift counts when we should have been using the
bitsize of the operand modes.  This was wrong when we had an SImode shift
and a 64-bit target.

Andrew Waterman  <andrew@sifive.com>
gcc/
* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1]
bitsize instead of BITS_PER_WORD.
gcc/testsuite/
* gcc.target/riscv/shift-shift-2.c: Add one more test.

From-SVN: r273230
gcc/ChangeLog
gcc/config/riscv/riscv.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/riscv/shift-shift-2.c