aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-06-25 10:17:39 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-06-25 08:17:39 +0000
commit1a3e38aee22d2b6f8f990b05c9fdb5eeb316acfd (patch)
tree0c65ebc96b3b24c663076a58007208d5623b9b39 /gcc
parentc23524153d2b7b683526969a0d9b85efdc8c2767 (diff)
downloadgcc-1a3e38aee22d2b6f8f990b05c9fdb5eeb316acfd.zip
gcc-1a3e38aee22d2b6f8f990b05c9fdb5eeb316acfd.tar.gz
gcc-1a3e38aee22d2b6f8f990b05c9fdb5eeb316acfd.tar.bz2
Properly sum costs in tree-vect-loop.c (PR tree-optimization/90973).
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-vect-loop.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b18833b..c5b729c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index d3facf6..489bee6 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -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
{