Commit 3c3f12e2 by Richard Sandiford

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.
parent 1acde74c
2020-04-16 Richard Sandiford <richard.sandiford@arm.com>
PR rtl-optimization/94605
* early-remat.c (early_remat::process_block): Handle insns that
set multiple candidate registers.
2020-04-16 Richard Biener <rguenther@suse.de>
PR middle-end/94614
......
......@@ -2020,7 +2020,7 @@ early_remat::process_block (basic_block bb)
}
/* Now process definitions. */
if (next_def && insn == next_def->insn)
while (next_def && insn == next_def->insn)
{
unsigned int gen = canon_candidate (next_candidate);
......
2020-04-16 Richard Sandiford <richard.sandiford@arm.com>
PR rtl-optimization/94605
* gcc.target/aarch64/sve/pr94605.c: New test.
2020-04-16 Richard Biener <rguenther@suse.de>
* gcc.dg/graphite/interchange-1.c: Remove scan for tiled.
......
/* { dg-options "-O2 -msve-vector-bits=256" } */
typedef int v8si __attribute__((vector_size(32)));
int g (v8si, v8si);
void
f (void)
{
v8si x = {}, y = {};
while (g (x, y))
asm ("" : "+w" (x), "+w" (y));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment