+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 ...
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),
}
/* 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);