diff options
author | Richard Biener <rguenther@suse.de> | 2017-04-20 14:26:26 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-04-20 14:26:26 +0000 |
commit | 067bc855b23fc7351db7030be0c881e3760b7e6f (patch) | |
tree | 2b00d40466c5ccf59cd6a56db46e4fa0a29f9760 /gcc/tree-vect-stmts.c | |
parent | acb14262e18e8338c014926cdbcd034832f3561e (diff) | |
download | gcc-067bc855b23fc7351db7030be0c881e3760b7e6f.zip gcc-067bc855b23fc7351db7030be0c881e3760b7e6f.tar.gz gcc-067bc855b23fc7351db7030be0c881e3760b7e6f.tar.bz2 |
re PR target/57796 (AVX2 gather vectorization: code bloat and reduction of performance)
2017-04-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/57796
* tree-vect-stmts.c (vect_model_store_cost): Cost scatters
as N scalar stores.
(vect_model_load_cost): Cost gathers as N scalar loads.
From-SVN: r247026
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index bfb7185..31349f2 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -929,7 +929,8 @@ vect_model_store_cost (stmt_vec_info stmt_info, int ncopies, tree vectype = STMT_VINFO_VECTYPE (stmt_info); /* Costs of the stores. */ - if (memory_access_type == VMAT_ELEMENTWISE) + if (memory_access_type == VMAT_ELEMENTWISE + || memory_access_type == VMAT_GATHER_SCATTER) /* N scalar stores plus extracting the elements. */ inside_cost += record_stmt_cost (body_cost_vec, ncopies * TYPE_VECTOR_SUBPARTS (vectype), @@ -1056,7 +1057,8 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies, } /* The loads themselves. */ - if (memory_access_type == VMAT_ELEMENTWISE) + if (memory_access_type == VMAT_ELEMENTWISE + || memory_access_type == VMAT_GATHER_SCATTER) { /* N scalar loads plus gathering them into a vector. */ tree vectype = STMT_VINFO_VECTYPE (stmt_info); |