]> gcc.gnu.org Git - gcc.git/commit
[to-be-committed,RISC-V] Improve usage of slli.uw in constant synthesis
authorJeff Law <jlaw@ventanamicro.com>
Sun, 12 May 2024 13:12:04 +0000 (07:12 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 12 May 2024 13:13:25 +0000 (07:13 -0600)
commit83fb5e6f382ea99ca0e2a0afeb25a9f78909f25f
tree0faad0f7e2cff61092ed29530cac07a8ed4feacf
parent77a28ed91b2a527b9006ee1a220b468756b43eca
[to-be-committed,RISC-V] Improve usage of slli.uw in constant synthesis

And an improvement to using slli.uw...

I recently added the ability to use slli.uw in the synthesis path.  That
code was conditional on the right justified constant being a LUI_OPERAND
after sign extending from bit 31 to bit 63.

That code is working fine, but could be improved.  Specifically there's
no reason it shouldn't work for LUI+ADDI under the same circumstances.
So rather than testing the sign extended, right justified constant is a
LUI_OPERAND, we can just test that the right justified constant has
precisely 32 leading zeros.

gcc/
* config/riscv/riscv.cc (riscv_build_integer_1): Use slli.uw more.

gcc/testsuite
* gcc.target/riscv/synthesis-5.c: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/synthesis-5.c [new file with mode: 0644]
This page took 0.052165 seconds and 5 git commands to generate.