diff options
author | Richard Biener <rguenther@suse.de> | 2016-06-06 06:55:19 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-06-06 06:55:19 +0000 |
commit | 9fcebb5aa882861d403b87a572f17c69c8ecab08 (patch) | |
tree | 128b15f444ed9ad6d183ced258d915657f46b78b /gcc/tree-ssa-loop-ivcanon.c | |
parent | d48ab0103a07218cc7cb54d705d7b22b596648bf (diff) | |
download | gcc-9fcebb5aa882861d403b87a572f17c69c8ecab08.zip gcc-9fcebb5aa882861d403b87a572f17c69c8ecab08.tar.gz gcc-9fcebb5aa882861d403b87a572f17c69c8ecab08.tar.bz2 |
re PR tree-optimization/71398 (ICE at -O3 in 32-bit and 64-bit mode on x86_64-linux-gnu (Segmentation fault, find_edge))
2016-06-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/71398
* tree-ssa-loop-ivcanon.c (unloop_loops): First unloop, then
remove edges.
* gcc.dg/torture/pr71398.c: New testcase.
From-SVN: r237117
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index 248c125..5a7c378 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -615,16 +615,6 @@ static void unloop_loops (bitmap loop_closed_ssa_invalidated, bool *irred_invalidated) { - /* First remove edges in peeled copies. */ - unsigned i; - edge e; - FOR_EACH_VEC_ELT (edges_to_remove, i, e) - { - bool ok = remove_path (e); - gcc_assert (ok); - } - edges_to_remove.release (); - while (loops_to_unloop.length ()) { struct loop *loop = loops_to_unloop.pop (); @@ -660,6 +650,16 @@ unloop_loops (bitmap loop_closed_ssa_invalidated, } loops_to_unloop.release (); loops_to_unloop_nunroll.release (); + + /* Remove edges in peeled copies. */ + unsigned i; + edge e; + FOR_EACH_VEC_ELT (edges_to_remove, i, e) + { + bool ok = remove_path (e); + gcc_assert (ok); + } + edges_to_remove.release (); } /* Tries to unroll LOOP completely, i.e. NITER times. |