aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-vect-stmts.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 408f4af..60dec98 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2016-07-06 Richard Sandiford <richard.sandiford@arm.com>
+ * tree-vect-stmts.c (vect_model_store_cost): For non-SLP
+ strided groups, use the cost of N scalar accesses instead
+ of ncopies vector accesses.
+ (vect_model_load_cost): Likewise.
+
+2016-07-06 Richard Sandiford <richard.sandiford@arm.com>
+
* tree-vect-stmts.c (vect_cost_group_size): Delete.
(vect_model_store_cost): Avoid calling it. Use first_stmt_p
variable to indicate when once-per-group costs are being used.
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index aff0cc6..b17fa7b 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -926,8 +926,7 @@ vect_model_store_cost (stmt_vec_info stmt_info, int ncopies,
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
/* Costs of the stores. */
- if (STMT_VINFO_STRIDED_P (stmt_info)
- && !STMT_VINFO_GROUPED_ACCESS (stmt_info))
+ if (STMT_VINFO_STRIDED_P (stmt_info) && !slp_node)
{
/* N scalar stores plus extracting the elements. */
inside_cost += record_stmt_cost (body_cost_vec,
@@ -1059,8 +1058,7 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies,
}
/* The loads themselves. */
- if (STMT_VINFO_STRIDED_P (stmt_info)
- && !STMT_VINFO_GROUPED_ACCESS (stmt_info))
+ if (STMT_VINFO_STRIDED_P (stmt_info) && !slp_node)
{
/* N scalar loads plus gathering them into a vector. */
tree vectype = STMT_VINFO_VECTYPE (stmt_info);