diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2016-07-06 08:12:36 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2016-07-06 08:12:36 +0000 |
commit | 071e8018fe67cabb165255ac88a165b80fadbcc7 (patch) | |
tree | 038668afd87ead261a1eddfada832cac39602aa9 /gcc/tree-vectorizer.h | |
parent | 892a981f1efb398768ad5a138fb7c971462d1e79 (diff) | |
download | gcc-071e8018fe67cabb165255ac88a165b80fadbcc7.zip gcc-071e8018fe67cabb165255ac88a165b80fadbcc7.tar.gz gcc-071e8018fe67cabb165255ac88a165b80fadbcc7.tar.bz2 |
[3/7] Fix load/store costs for strided groups
vect_model_store_cost had:
/* Costs of the stores. */
if (STMT_VINFO_STRIDED_P (stmt_info)
&& !STMT_VINFO_GROUPED_ACCESS (stmt_info))
{
/* N scalar stores plus extracting the elements. */
inside_cost += record_stmt_cost (body_cost_vec,
ncopies * TYPE_VECTOR_SUBPARTS (vectype),
scalar_store, stmt_info, 0, vect_body);
But non-SLP strided groups also use individual scalar stores rather than
vector stores, so I think we should skip this only for SLP groups.
The same applies to vect_model_load_cost.
Tested on aarch64-linux-gnu and x86_64-linux-gnu.
gcc/
* 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.
From-SVN: r238035
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions