diff options
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 556264c58f4..0b29c5ee8b4 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -841,6 +841,7 @@ tree_unroll_loop (struct loops *loops, struct loop *loop, unsigned factor, use_operand_p op; bool ok; unsigned est_niter; + unsigned irr = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP; sbitmap wont_exit; est_niter = expected_loop_iterations (loop); @@ -883,7 +884,7 @@ tree_unroll_loop (struct loops *loops, struct loop *loop, unsigned factor, loop_split_edge_with (loop_latch_edge (loop), NULL); exit_bb = single_pred (loop->latch); - new_exit = make_edge (exit_bb, rest, EDGE_FALSE_VALUE); + new_exit = make_edge (exit_bb, rest, EDGE_FALSE_VALUE | irr); new_exit->count = loop_preheader_edge (loop)->count; est_niter = est_niter / factor + 1; new_exit->probability = REG_BR_PROB_BASE / est_niter; |