From f335184d24fa4ae7f1242e3a9bb675fab8e0b732 Mon Sep 17 00:00:00 2001 From: Pat Haugen Date: Wed, 14 Sep 2016 17:04:18 +0000 Subject: [PATCH] loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge. * loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge. From-SVN: r240140 --- gcc/ChangeLog | 4 ++++ gcc/loop-unroll.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 65dc182..8527518 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-09-14 Pat Haugen + + * loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge. + 2016-09-14 Segher Boessenkool * target.def (lra_p): Change commentary (for the manual) for the diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index b568ea5..2d5fe48 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -979,7 +979,7 @@ unroll_loop_runtime_iterations (struct loop *loop) swtch = split_edge_and_insert (single_pred_edge (swtch), branch_code); set_immediate_dominator (CDI_DOMINATORS, preheader, swtch); - single_pred_edge (swtch)->probability = REG_BR_PROB_BASE - p; + single_succ_edge (swtch)->probability = REG_BR_PROB_BASE - p; e = make_edge (swtch, preheader, single_succ_edge (swtch)->flags & EDGE_IRREDUCIBLE_LOOP); e->count = RDIV (preheader->count * REG_BR_PROB_BASE, p); -- 2.7.4