+2017-10-17 Jan Hubicka <hubicka@ucw.cz>
+
+ * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
+ vec_scatter_store
+ * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
+ and scatter/gather ops.
+
+ * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
+ vec_gather_load and vec_scatter_store.
+ * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
+ * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
+ * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
+ * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
+ * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
+
2017-10-17 Uros Bizjak <ubizjak@gmail.com>
* reg-stack.c (compare_for_stack_reg): Add bool argument.
return costs->scalar_to_vec_cost;
case unaligned_load:
+ case vector_gather_load:
return costs->vec_unalign_load_cost;
case unaligned_store:
+ case vector_scatter_store:
return costs->vec_unalign_store_cost;
case cond_branch_taken:
return current_tune->vec_costs->scalar_to_vec_cost;
case unaligned_load:
+ case vector_gather_load:
return current_tune->vec_costs->vec_unalign_load_cost;
case unaligned_store:
+ case vector_scatter_store:
return current_tune->vec_costs->vec_unalign_store_cost;
case cond_branch_taken:
return 3;
case unaligned_load:
+ case vector_gather_load:
if (TARGET_P9_VECTOR)
return 3;
return 2;
case unaligned_store:
+ case vector_scatter_store:
if (TARGET_EFFICIENT_UNALIGNED_VSX)
return 1;
return 3;
case unaligned_load:
+ case vector_gather_load:
if (TARGET_EFFICIENT_UNALIGNED_VSX)
return 1;
return 2;
case unaligned_store:
+ case vector_scatter_store:
if (TARGET_EFFICIENT_UNALIGNED_VSX)
return 1;
case vector_stmt:
case vector_load:
case vector_store:
+ case vector_gather_load:
+ case vector_scatter_store:
case vec_to_scalar:
case scalar_to_vec:
case cond_branch_not_taken:
return 2;
case unaligned_load:
+ case vector_gather_load:
+ case vector_scatter_store:
return 2;
case cond_branch_taken:
scalar_store,
vector_stmt,
vector_load,
+ vector_gather_load,
unaligned_load,
unaligned_store,
vector_store,
+ vector_scatter_store,
vec_to_scalar,
scalar_to_vec,
cond_branch_not_taken,
enum vect_cost_for_stmt kind, stmt_vec_info stmt_info,
int misalign, enum vect_cost_model_location where)
{
+ if ((kind == vector_load || kind == unaligned_load)
+ && STMT_VINFO_GATHER_SCATTER_P (stmt_info))
+ kind = vector_gather_load;
+ if ((kind == vector_store || kind == unaligned_store)
+ && STMT_VINFO_GATHER_SCATTER_P (stmt_info))
+ kind = vector_scatter_store;
if (body_cost_vec)
{
tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;