[PR target/123911][RISC-V] Fix infinite recursion in riscv_legitimize_move
I kept hoping I'd see a better solution, perhaps one where chunks of this
routine just go away, but that hasn't materialized. So...
This patch avoids infinite recursion through riscv_legitimize_move.
Essentially we end up calling it recursively with arguments that are a nop-move
and those particular arguments trigger infinite recursion.
So this patch just recognizes and elides the nop move. Bootstrapped on
riscv64-linux-gnu and regression tested on riscv{32,64}-elf with no
regressions. Pushing to the trunk.