aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phionlycprop.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-06-26 07:19:37 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-06-26 07:19:37 +0000
commit25853b33482749fb6a07336ea3790a45cc1752f7 (patch)
treefb16b8aa818baf168138b04424264d43e2164300 /gcc/tree-ssa-phionlycprop.c
parentddc36d5a1def2504956a9b40f31f09c5873e6349 (diff)
downloadgcc-25853b33482749fb6a07336ea3790a45cc1752f7.zip
gcc-25853b33482749fb6a07336ea3790a45cc1752f7.tar.gz
gcc-25853b33482749fb6a07336ea3790a45cc1752f7.tar.bz2
re PR tree-optimization/80928 (SLP vectorization does not handle induction in outer loop vectorization)
2017-06-26 Richard Biener <rguenther@suse.de> PR tree-optimization/80928 * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag. (copy_bbs): Set BB_DUPLICATED flag early. (execute_on_growing_pred): Do not execute for BB_DUPLICATED marked blocks. (execute_on_shrinking_pred): Likewise. * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in BB_DUPLICATED blocks. * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly iterate over all PHIs considering removal of *gsi. From-SVN: r249638
Diffstat (limited to 'gcc/tree-ssa-phionlycprop.c')
-rw-r--r--gcc/tree-ssa-phionlycprop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-phionlycprop.c b/gcc/tree-ssa-phionlycprop.c
index aa0f502..9fa427f 100644
--- a/gcc/tree-ssa-phionlycprop.c
+++ b/gcc/tree-ssa-phionlycprop.c
@@ -420,10 +420,11 @@ eliminate_degenerate_phis_1 (basic_block bb, bitmap interesting_names,
basic_block son;
bool cfg_altered = false;
- for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi);)
{
gphi *phi = gsi.phi ();
-
+ /* We might end up removing PHI so advance the iterator now. */
+ gsi_next (&gsi);
cfg_altered |= eliminate_const_or_copy (phi, interesting_names,
need_eh_cleanup);
}