re PR tree-optimization/58326 (ICE in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:551)

2013-09-09  Richard Biener  <rguenther@suse.de>

	PR middle-end/58326
	* cfgloopmanip.c (fix_bb_placements): When fixing the placement
	of a subloop record all its block as affecting loop-closed SSA form.

	* gcc.dg/torture/pr58326-1.c: New testcase.
	* gcc.dg/torture/pr58326-2.c: Likewise.

From-SVN: r202399
This commit is contained in:
Richard Biener 2013-09-09 13:18:38 +00:00 committed by Richard Biener
parent 849107c128
commit 467a3558ef
5 changed files with 63 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-09-09 Richard Biener <rguenther@suse.de>
PR middle-end/58326
* cfgloopmanip.c (fix_bb_placements): When fixing the placement
of a subloop record all its block as affecting loop-closed SSA form.
2013-09-09 Richard Sandiford <rdsandiford@googlemail.com>
* expmed.c (lshift_value): Take an unsigned HOST_WIDE_INT instead

View File

@ -223,15 +223,22 @@ fix_bb_placements (basic_block from,
if (!fix_loop_placement (from->loop_father, irred_invalidated))
continue;
target_loop = loop_outer (from->loop_father);
if (loop_closed_ssa_invalidated)
{
basic_block *bbs = get_loop_body (from->loop_father);
for (unsigned i = 0; i < from->loop_father->num_nodes; ++i)
bitmap_set_bit (loop_closed_ssa_invalidated, bbs[i]->index);
free (bbs);
}
}
else
{
/* Ordinary basic block. */
if (!fix_bb_placement (from))
continue;
target_loop = from->loop_father;
if (loop_closed_ssa_invalidated)
bitmap_set_bit (loop_closed_ssa_invalidated, from->index);
target_loop = from->loop_father;
}
FOR_EACH_EDGE (e, ei, from->succs)

View File

@ -1,3 +1,9 @@
2013-09-09 Richard Biener <rguenther@suse.de>
PR middle-end/58326
* gcc.dg/torture/pr58326-1.c: New testcase.
* gcc.dg/torture/pr58326-2.c: Likewise.
2013-09-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/57735

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
int a, *d;
long b;
short c;
void foo ()
{
int e;
lbl:
for (c = 0; c < 2; c++)
{
if (1 >> b)
break;
e = *d;
for (; a; a++)
{
*d = e;
if (b)
goto lbl;
}
}
}

View File

@ -0,0 +1,20 @@
/* { dg-do compile } */
int a, b, c, d;
void foo ()
{
int e;
lbl:
for (c = 0; c < 2; c++)
{
e = d;
for (; a; a++)
{
d = e;
if (b)
goto lbl;
}
}
}