pru: Split 64-bit moves into a sequence of 32-bit moves
The 64-bit register-to-register moves on PRU are implemented with two
instructions moving 32-bit registers. Defining a split for the 64-bit
moves allows this to be described in RTL, and thus one of the 32-bit
moves to be eliminated if the destination register is dead.
Also, split the loading of non-trivial 64-bit integer constants. The
resulting 32-bit integer constants have better chance to be loaded with
something more optimal than an "ldi32".
For now do the splits only after register allocation, because LRA does
not yet efficiently handle subregs. See
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651366.html
This patch shows slight improvement for wikisort benchmark from
embench-iot:
* config/pru/pru.md (reg move splitter): New splitter for 64-bit
register moves into two 32-bit moves.
(const_int move splitter): New splitter for 64-bit constant
integer moves into two 32-bit moves.
gcc/testsuite/ChangeLog:
* gcc.target/pru/mov64-subreg-1.c: New test.
* gcc.target/pru/mov64-subreg-2.c: New test.