aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-vect-slp.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index b5f9333..0bcc530 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -6406,6 +6406,11 @@ vectorizable_bb_reduc_epilogue (slp_instance instance,
vectype, 0, vect_body);
record_stmt_cost (cost_vec, 1, vec_to_scalar, instance->root_stmts[0],
vectype, 0, vect_body);
+
+ /* Since we replace all stmts of a possibly longer scalar reduction
+ chain account for the extra scalar stmts for that. */
+ record_stmt_cost (cost_vec, instance->remain_defs.length (), scalar_stmt,
+ instance->root_stmts[0], 0, vect_body);
return true;
}