aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-11-25 08:27:42 +0100
committerRichard Biener <rguenther@suse.de>2022-11-25 08:27:42 +0100
commitbcc2449384f2092cbdf5d6ac2357aeabe3212b2e (patch)
tree273c3818c49048483e3731089711dc9f556020a6 /gcc/tree-cfg.cc
parentf120196382ac5ac49ec4a60f8abad42f22d45a91 (diff)
downloadgcc-bcc2449384f2092cbdf5d6ac2357aeabe3212b2e.zip
gcc-bcc2449384f2092cbdf5d6ac2357aeabe3212b2e.tar.gz
gcc-bcc2449384f2092cbdf5d6ac2357aeabe3212b2e.tar.bz2
tree-optimization/107865 - ICE with outlining of loops
The following makes sure to clear loops number of iterations when outlining them as part of a SESE region as can happen with auto-parallelization. The referenced SSA names become stale otherwise. PR tree-optimization/107865 * tree-cfg.cc (move_sese_region_to_fn): Free the number of iterations of moved loops. * gfortran.dg/graphite/pr107865.f90: New testcase.
Diffstat (limited to 'gcc/tree-cfg.cc')
-rw-r--r--gcc/tree-cfg.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index 2817531..0c409b4 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -7859,6 +7859,8 @@ move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb,
if (bb->loop_father->header == bb)
{
class loop *this_loop = bb->loop_father;
+ /* Avoid the need to remap SSA names used in nb_iterations. */
+ free_numbers_of_iterations_estimates (this_loop);
class loop *outer = loop_outer (this_loop);
if (outer == loop
/* If the SESE region contains some bbs ending with