The following patch corrects a problem with setting the probability on the pred edge instead of the newly created fallthru succ edge.
Bootstrap/regtest on powerpc64le with no new regressions. Committed as obvious. -Pat 2016-09-14 Pat Haugen <pthau...@us.ibm.com> * loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge. Index: gcc/loop-unroll.c =================================================================== --- gcc/loop-unroll.c (revision 240092) +++ gcc/loop-unroll.c (working copy) @@ -979,7 +979,7 @@ unroll_loop_runtime_iterations (struct l 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);