summaryrefslogtreecommitdiff
path: root/gcc/cfgloopmanip.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-09 13:18:38 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-09 13:18:38 +0000
commit9cad916b864b49c3e87e2945d604af6c72ee6cf1 (patch)
treef64252be9ef1b4500b3be2868803c331e4506af8 /gcc/cfgloopmanip.c
parentc20fedc4006748b638de6ffc478e1084c720ed72 (diff)
downloadgcc-9cad916b864b49c3e87e2945d604af6c72ee6cf1.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202399 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloopmanip.c')
-rw-r--r--gcc/cfgloopmanip.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index f35e5aedc79..cce5d467f57 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -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)