]> git.ipfire.org Git - thirdparty/gcc.git/commit
[RISC-V] Avoid multiple assignments to output object
authorJeff Law <jlaw@ventanamicro.com>
Tue, 20 May 2025 02:31:27 +0000 (20:31 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Tue, 20 May 2025 02:31:27 +0000 (20:31 -0600)
commit9de7d374323eea212aa1ffb2208a0c7cfcf46f51
tree40e7652e165cf97f373bfcb7e7566d2a96955162
parentb0de7297f2b5670386472229ab795a577c288ecf
[RISC-V] Avoid multiple assignments to output object

This is the next batch of changes to reduce multiple assignments to an output
object.  This time I'm focused on splitters in bitmanip.md.

This doesn't convert every case.  For example there is one case that is very
clearly dependent on eliminating mvconst_internal and adjustment of a splitter
for andn and until those things happen it would clearly be a QOI implementation
regression.

There are cases where we set a scratch register more than once.  It may be
possible to use an additional scratch.  I haven't tried that yet.

I've seen one failure to if-convert a sequence after this patch, but it should
be resolved once the logical AND changes are merged.  Otherwise I'm primarily
seeing slight differences in register allocation and scheduling.  Nothing
concerning to me.

This has run through my tester, but I obviously want to see how it behaves in
the upstream CI system as that tests slightly different multilibs than mine (on
purpose).

gcc/

* config/riscv/bitmanip.md (various splits): Avoid writing the output
more than once when trivially possible.
gcc/config/riscv/bitmanip.md