[PR103302] skip multi-word pre-move clobber during lra
commit50e8b0c9bca6cdc57804f860ec5311b641753fbb
authorAlexandre Oliva <oliva@adacore.com>
Thu, 9 Dec 2021 02:37:14 +0000 (8 23:37 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 9 Dec 2021 02:37:14 +0000 (8 23:37 -0300)
tree611ff19bef2b5e3ea11233f2c16b58f324e11503
parent2bff91f3b4e6f697823a261222186f4b5b052e86
[PR103302] skip multi-word pre-move clobber during lra

If we emit clobbers before multi-word moves during lra, we get
confused if a copy ends up with input or output replaced with each
other: the clobber then kills the previous set, and it gets deleted.

This patch avoids emitting such clobbers when lra_in_progress.

for  gcc/ChangeLog

PR target/103302
* expr.c (emit_move_multi_word): Skip clobber during lra.

for  gcc/testsuite/ChangeLog

PR target/103302
* gcc.target/riscv/pr103302.c: New.
gcc/expr.c
gcc/testsuite/gcc.target/riscv/pr103302.c [new file with mode: 0644]