early-remat: Handle sets of multiple candidate regs [PR94605]
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 15 Apr 2020 10:38:24 +0000 (11:38 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 16 Apr 2020 12:06:10 +0000 (13:06 +0100)
commit3c3f12e2a7625c9a2f5d74a47dbacb2fd1ae5643
tree867f3f5046c7a5cd28036be268a5711aa2203a8f
parent1acde74cf611f560172c74324610c29ca81edf94
early-remat: Handle sets of multiple candidate regs [PR94605]

early-remat.c:process_block wasn't handling insns that set multiple
candidate registers, which led to an assertion failure at the end
of the main loop.

Instructions that set two pseudos aren't rematerialisation candidates in
themselves, but we still need to track them if another instruction that
sets the same register is a rematerialisation candidate.

2020-04-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR rtl-optimization/94605
* early-remat.c (early_remat::process_block): Handle insns that
set multiple candidate registers.

gcc/testsuite/
PR rtl-optimization/94605
* gcc.target/aarch64/sve/pr94605.c: New test.
gcc/ChangeLog
gcc/early-remat.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/pr94605.c [new file with mode: 0644]