loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge.
authorPat Haugen <pthaugen@us.ibm.com>
Wed, 14 Sep 2016 17:04:18 +0000 (17:04 +0000)
committerPat Haugen <pthaugen@gcc.gnu.org>
Wed, 14 Sep 2016 17:04:18 +0000 (17:04 +0000)
* loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge.

From-SVN: r240140

gcc/ChangeLog
gcc/loop-unroll.c

index 65dc1822376aa178f8221c432a2fd2930bc0bfa6..85275186b958a6a90276e236b3d504a5f30df2d8 100644 (file)
@@ -1,3 +1,7 @@
+2016-09-14  Pat Haugen  <pthaugen@us.ibm.com>
+
+       * loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge.
+
 2016-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * target.def (lra_p): Change commentary (for the manual) for the
index b568ea56d84a3f43fc03cdbaf1d9dd93fad7480a..2d5fe48411b4d2801ecbdb594e9b78d455240259 100644 (file)
@@ -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);