From 166b87998a85c8c7d6db923bc7c8370af3665381 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Tue, 10 Oct 2017 08:59:23 +0000 Subject: [PATCH] tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip renaming variables in new preheader if it's deleted. * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip renaming variables in new preheader if it's deleted. From-SVN: r253579 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-loop-manip.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b6beb84106..6ce0d73dc47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-10 Bin Cheng + + * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip + renaming variables in new preheader if it's deleted. + 2017-10-10 Bin Cheng * tree-loop-distribution.c (struct partition): Remove unused field diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 5787d53a83a..fb73a885b24 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -496,7 +496,8 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, loop_preheader_edge (new_loop)->src); } - for (unsigned i = 0; i < scalar_loop->num_nodes + 1; i++) + /* Skip new preheader since it's deleted if copy loop is added at entry. */ + for (unsigned i = (at_exit ? 0 : 1); i < scalar_loop->num_nodes + 1; i++) rename_variables_in_bb (new_bbs[i], duplicate_outer_loop); if (scalar_loop != loop) -- 2.30.2