Properly sum costs in tree-vect-loop.c (PR tree-optimization/90973).
authorMartin Liska <mliska@suse.cz>
Tue, 25 Jun 2019 08:17:39 +0000 (10:17 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 25 Jun 2019 08:17:39 +0000 (08:17 +0000)
2019-06-25  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90973
* tree-vect-loop.c (vect_get_known_peeling_cost): Sum retval
of prologue and epilogue.

From-SVN: r272638

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

index b18833b4367ea2534a5229c5bd14ba438e3b1607..c5b729c63aa6a80ec3b520c408a5aa09779bc35b 100644 (file)
@@ -1,3 +1,9 @@
+2019-06-25  Martin Liska  <mliska@suse.cz>
+
+       PR tree-optimization/90973
+       * tree-vect-loop.c (vect_get_known_peeling_cost): Sum retval
+       of prologue and epilogue.
+
 2019-06-24  Jan Hubicka  <jh@suse.cz>
 
        * ipa-utils.h (type_with_linkage_p): Verify that type is
index d3facf67bf951ce6c3bacd8c0d5baeacb4d36503..489bee65397a9335a72c18d8c769460e9ca8c6d7 100644 (file)
@@ -3405,8 +3405,8 @@ 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,
-                                NULL, 0, vect_epilogue);
+      retval += record_stmt_cost (prologue_cost_vec, 1, cond_branch_taken,
+                                 NULL, 0, vect_epilogue);
     }
   else
     {