From: Richard Biener Date: Thu, 20 Apr 2017 14:26:26 +0000 (+0000) Subject: re PR target/57796 (AVX2 gather vectorization: code bloat and reduction of performance) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=067bc855b23fc7351db7030be0c881e3760b7e6f;p=gcc.git re PR target/57796 (AVX2 gather vectorization: code bloat and reduction of performance) 2017-04-20 Richard Biener 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc1260739e0..1ee54cfe91d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-04-20 Richard Biener + + 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 * ggc-page.c (ggc_allocated_p): Rename to ... diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index bfb7185f5e0..31349f2b9c1 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);