]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH 1/2 v2] RISC-V: Additional large constant synthesis improvements
authorRaphael Moreira Zinsly <rzinsly@ventanamicro.com>
Fri, 6 Sep 2024 03:50:54 +0000 (21:50 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Fri, 6 Sep 2024 03:50:54 +0000 (21:50 -0600)
commitecdb9f59d0915f154a4c8fa56e11d81479f535eb
tree7ffb050f6d92c2d6d11391b4fda907d18209354a
parenta2e28b105cea4c44c3903d8d979c7a4afa1193f0
[PATCH 1/2 v2] RISC-V: Additional large constant synthesis improvements

Changes since v1:
- Fix bit31.
- Remove negative shift checks.
- Fix synthesis-7.c expected output.

-- >8 --

Improve handling of large constants in riscv_build_integer, generate
better code for constants where the high half can be constructed
by shifting/shiftNadding the low half or if the halves differ by less
than 2k.

gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_build_integer): Detect new case
of constants that can be improved.
(riscv_move_integer): Add synthesys for concatening constants
without Zbkb.

gcc/testsuite/ChangeLog:
* gcc.target/riscv/synthesis-7.c: Adjust expected output.
* gcc.target/riscv/synthesis-12.c: New test.
* gcc.target/riscv/synthesis-13.c: New test.
* gcc.target/riscv/synthesis-14.c: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/synthesis-12.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/synthesis-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/synthesis-14.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/synthesis-7.c