diff options
author | Richard Biener <rguenther@suse.de> | 2016-11-24 12:25:22 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-11-24 12:25:22 +0000 |
commit | eb2afa1a80613d37aa12fdd5a0624b45fdef9377 (patch) | |
tree | e719b1da7d230192f4964664cd374d04f8b94006 /gcc/tree-ssa-loop-ivcanon.c | |
parent | 2d8fec87b11ecfad75f8cae7910e60e1a61ec61b (diff) |
re PR tree-optimization/71595 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu: in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:704)
2016-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/71595
* cfgloopmanip.h (remove_path): Add irred_invalidated and
loop_closed_ssa_invalidated parameters, defaulted to NULL.
* cfgloopmanip.c (remove_path): Likewise, pass them along to
called functions. Only fix irred flags if the caller didn't
request state.
* tree-ssa-loop-ivcanon.c (unloop_loops): Use add_bb_to_loop.
(unloop_loops): Pass irred_invalidated and loop_closed_ssa_invalidated
to remove_path.
* gcc.dg/torture/pr71595.c: New testcase.
From-SVN: r242835
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index beb65b04e29..906149602c9 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -647,7 +647,7 @@ unloop_loops (bitmap loop_closed_ssa_invalidated, latch_edge->flags |= flags; latch_edge->goto_locus = locus; - latch_edge->dest->loop_father = current_loops->tree_root; + add_bb_to_loop (latch_edge->dest, current_loops->tree_root); latch_edge->dest->count = 0; latch_edge->dest->frequency = 0; set_immediate_dominator (CDI_DOMINATORS, latch_edge->dest, latch_edge->src); @@ -663,7 +663,7 @@ unloop_loops (bitmap loop_closed_ssa_invalidated, edge e; FOR_EACH_VEC_ELT (edges_to_remove, i, e) { - bool ok = remove_path (e); + bool ok = remove_path (e, irred_invalidated, loop_closed_ssa_invalidated); gcc_assert (ok); } edges_to_remove.release (); |