Fix one another thinko in tree-vect-loop.c (PR tree-optimization/90973).
authorMartin Liska <mliska@suse.cz>
Wed, 26 Jun 2019 06:44:58 +0000 (08:44 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 26 Jun 2019 06:44:58 +0000 (06:44 +0000)
2019-06-26  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90973
* tree-vect-loop.c (vect_get_known_peeling_cost): Use
epilogue_cost_vec instead of prologue_cost_vec for
a epilogue cost.

From-SVN: r272671

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

index fbaed7f466a51a727a69f93a80db6191dbab7342..d06f5569bcd39bdbe8fb2c2554bbb5a595cf47f9 100644 (file)
@@ -1,3 +1,10 @@
+2019-06-26  Martin Liska  <mliska@suse.cz>
+
+       PR tree-optimization/90973
+       * tree-vect-loop.c (vect_get_known_peeling_cost): Use
+       epilogue_cost_vec instead of prologue_cost_vec for
+       a epilogue cost.
+
 2019-06-26  Martin Liska  <mliska@suse.cz>
 
        * bb-reorder.c (connect_better_edge_p): Add missing else
index 489bee65397a9335a72c18d8c769460e9ca8c6d7..b37bf6f427dbc5994bf20e8740d2a41fe4947562 100644 (file)
@@ -3405,7 +3405,7 @@ vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue,
          iterations are unknown, count a taken branch per peeled loop.  */
       retval = record_stmt_cost (prologue_cost_vec, 1, cond_branch_taken,
                                 NULL, 0, vect_prologue);
-      retval += record_stmt_cost (prologue_cost_vec, 1, cond_branch_taken,
+      retval += record_stmt_cost (epilogue_cost_vec, 1, cond_branch_taken,
                                  NULL, 0, vect_epilogue);
     }
   else