tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders.

2017-03-07  Richard Biener  <rguenther@suse.de>

	* tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
	preheaders.

From-SVN: r245950
This commit is contained in:
Richard Biener 2017-03-07 13:39:44 +00:00 committed by Richard Biener
parent 2413298e2d
commit 5281a167ea
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2017-03-07 Richard Biener <rguenther@suse.de>
* tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
preheaders.
2017-03-07 Segher Boessenkool <segher@kernel.crashing.org>
* config/i386/i386.c (ix86_local_alignment): Align most aggregates

View File

@ -569,6 +569,11 @@ slpeel_add_loop_guard (basic_block guard_bb, tree cond,
enter_e->count -= new_e->count;
enter_e->probability = inverse_probability (probability);
set_immediate_dominator (CDI_DOMINATORS, guard_to, dom_bb);
/* Split enter_e to preserve LOOPS_HAVE_PREHEADERS. */
if (enter_e->dest->loop_father->header == enter_e->dest)
split_edge (enter_e);
return new_e;
}