From: Richard Biener Date: Tue, 7 Mar 2017 13:39:44 +0000 (+0000) Subject: tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5281a167eaf420235edcd5b47425d54a13ff74af;p=gcc.git tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders. 2017-03-07 Richard Biener * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders. From-SVN: r245950 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8298ebb8d4d..c1b71bc432e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-03-07 Richard Biener + + * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve + preheaders. + 2017-03-07 Segher Boessenkool * config/i386/i386.c (ix86_local_alignment): Align most aggregates diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 5ee2c38e048..2f82061afa9 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -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; }