On 8/8/24 11:10 AM, Raphael Moreira Zinsly wrote:
Improve handling of constants where the high half can be constructed
by shifting the low half.
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_build_integer): Detect constants
were the higher half is a shift of the lower half.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/synthesis-12.c: New test.
Don't you need to check somewhere that the upper/lower halves are the
same after an appropriate shift? It looks like you just assume they are.
Jeff
