diff options
author | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2022-11-08 20:45:51 +0100 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2022-11-18 21:15:24 +0100 |
commit | 30c2d8df173a6f3ca145cda9f9e261616fca8467 (patch) | |
tree | 0785511ec10ba37eb18538bddc3b6f458360e856 /gcc/jit | |
parent | acbb5ef06ee97849ecd5412ab56c1dff0f0d2fcf (diff) | |
download | gcc-30c2d8df173a6f3ca145cda9f9e261616fca8467.zip gcc-30c2d8df173a6f3ca145cda9f9e261616fca8467.tar.gz gcc-30c2d8df173a6f3ca145cda9f9e261616fca8467.tar.bz2 |
RISC-V: split to allow formation of sh[123]add before 32bit divw
When using strength-reduction, we will reduce a multiplication to a
sequence of shifts and adds. If this is performed with 32-bit types
and followed by a division, the lack of w-form sh[123]add will make
combination impossible and lead to a slli + addw being generated.
Split the sequence with the knowledge that a w-form div will perform
implicit sign-extensions.
gcc/ChangeLog:
* config/riscv/bitmanip.md: Add a define_split to optimize
slliw + addiw + divw into sh[123]add + divw.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zba-shNadd-05.c: New test.
Diffstat (limited to 'gcc/jit')
0 files changed, 0 insertions, 0 deletions