diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-09-05 22:32:55 +0200 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2019-09-05 13:32:55 -0700 |
commit | 36ec3f57d305e343ad1bbffa53e3484661a176a6 (patch) | |
tree | 2865b2618fabe876bb58c8f86dd2c67192a09778 /gcc/cp/repo.c | |
parent | 3c0f026505aca54c200b36870256c886b05eb4ff (diff) | |
download | gcc-36ec3f57d305e343ad1bbffa53e3484661a176a6.zip gcc-36ec3f57d305e343ad1bbffa53e3484661a176a6.tar.gz gcc-36ec3f57d305e343ad1bbffa53e3484661a176a6.tar.bz2 |
RISC-V: Fix bad insn splits with paradoxical subregs.
Shifting by more than the size of a SUBREG_REG doesn't work, so we either
need to disable splits if an input is paradoxical, or else we need to
generate a clean temporary for intermediate results.
Jakub wrote the first version of this patch, so gets primary credit for it.
gcc/
PR target/91635
* config/riscv/riscv.md (zero_extendsidi2, zero_extendhi<GPR:mode>2,
extend<SHORT:mode><SUPERQI:mode>2): Don't split if
paradoxical_subreg_p (operands[0]).
(*lshrsi3_zero_extend_3+1, *lshrsi3_zero_extend_3+2): Add clobber and
use as intermediate value.
gcc/testsuite/
PR target/91635
* gcc.c-torture/execute/pr91635.c: New test.
* gcc.target/riscv/shift-shift-4.c: New test.
* gcc.target/riscv/shift-shift-5.c: New test.
Co-Authored-By: Jim Wilson <jimw@sifive.com>
From-SVN: r275444
Diffstat (limited to 'gcc/cp/repo.c')
0 files changed, 0 insertions, 0 deletions