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
This commit is contained in:
Richard Biener 2017-04-20 14:26:26 +00:00 committed by Richard Biener
parent acb14262e1
commit 067bc855b2
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,10 @@
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.
2017-04-20 Richard Biener <rguenther@suse.de>
* ggc-page.c (ggc_allocated_p): Rename to ...

View file

@ -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);