* tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
authorJan Hubicka <hubicka@ucw.cz>
Mon, 3 Jul 2017 17:31:02 +0000 (19:31 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 3 Jul 2017 17:31:02 +0000 (17:31 +0000)
From-SVN: r249929

gcc/ChangeLog
gcc/tree-vect-loop-manip.c

index 6ac14d97866013c8586cd4dcb003c7f374d3422c..be3b09418b016571c4ee5593ba1c1279135ae2d6 100644 (file)
@@ -1,3 +1,7 @@
+2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
+
 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
 
        * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
index 34e4aa246fa10ee9dec1b987a4b9102b5f1dd8f2..b76b515a788886115bd59c20b29a364c765d828f 100644 (file)
@@ -1849,8 +1849,8 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
             get lost if we scale down to 0.  */
          int scale_up = REG_BR_PROB_BASE * REG_BR_PROB_BASE
                         / prob_vector.to_reg_br_prob_base ();
-         basic_block *bbs = get_loop_body (loop);
-         scale_bbs_frequencies_int (bbs, loop->num_nodes, scale_up,
+         basic_block *bbs = get_loop_body (epilog);
+         scale_bbs_frequencies_int (bbs, epilog->num_nodes, scale_up,
                                     REG_BR_PROB_BASE);
          free (bbs);
        }