+2016-05-24 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-vectorizer.h (vectorizable_comparison): Delete.
+ * tree-vect-loop.c (vectorizable_reduction): Remove redundant
+ PURE_SLP_STMT check.
+ * tree-vect-stmts.c (vectorizable_call): Likewise.
+ (vectorizable_simd_clone_call): Likewise.
+ (vectorizable_conversion): Likewise.
+ (vectorizable_assignment): Likewise.
+ (vectorizable_shift): Likewise.
+ (vectorizable_operation): Likewise.
+ (vectorizable_load): Likewise.
+ (vectorizable_condition): Likewise.
+ (vectorizable_store): Likewise. Assert that we don't have
+ hybrid SLP.
+ (vectorizable_comparison): Make static. Remove redundant
+ PURE_SLP_STMT check.
+ (vect_transform_stmt): Assert that we always have an slp_node
+ if PURE_SLP_STMT.
+
2016-05-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/neon.md (ashldi3_neon): Replace comparison of INTVAL of
}
}
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else if (modifier == NARROW && ifn == IFN_LAST)
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
return false;
/* FORNOW */
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
return false;
/* Process function arguments. */
/* Multiple types in SLP are handled by creating the appropriate number of
vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
case of SLP. */
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else if (modifier == NARROW)
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
/* Multiple types in SLP are handled by creating the appropriate number of
vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
case of SLP. */
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
/* Multiple types in SLP are handled by creating the appropriate number of
vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
case of SLP. */
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
/* Multiple types in SLP are handled by creating the appropriate number of
vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
case of SLP. */
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
&& TREE_CODE (scalar_dest) != MEM_REF)
return false;
+ /* Cannot have hybrid store SLP -- that would mean storing to the
+ same location twice. */
+ gcc_assert (slp == PURE_SLP_STMT (stmt_info));
+
gcc_assert (gimple_assign_single_p (stmt));
tree vectype = STMT_VINFO_VECTYPE (stmt_info), rhs_vectype = NULL_TREE;
/* Multiple types in SLP are handled by creating the appropriate number of
vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
case of SLP. */
- if (slp || PURE_SLP_STMT (stmt_info))
+ if (slp)
ncopies = 1;
else
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
grouped_store = true;
first_stmt = GROUP_FIRST_ELEMENT (stmt_info);
group_size = GROUP_SIZE (vinfo_for_stmt (first_stmt));
- if (!slp
- && !PURE_SLP_STMT (stmt_info)
- && !STMT_VINFO_STRIDED_P (stmt_info))
+ if (!slp && !STMT_VINFO_STRIDED_P (stmt_info))
{
if (vect_store_lanes_supported (vectype, group_size))
store_lanes_p = true;
}
if (STMT_VINFO_STRIDED_P (stmt_info)
- && (slp || PURE_SLP_STMT (stmt_info))
+ && slp
&& (group_size > nunits
|| nunits % group_size != 0))
{
/* Multiple types in SLP are handled by creating the appropriate number of
vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
case of SLP. */
- if (slp || PURE_SLP_STMT (stmt_info))
+ if (slp)
ncopies = 1;
else
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
first_stmt = GROUP_FIRST_ELEMENT (stmt_info);
group_size = GROUP_SIZE (vinfo_for_stmt (first_stmt));
- if (!slp
- && !PURE_SLP_STMT (stmt_info)
- && !STMT_VINFO_STRIDED_P (stmt_info))
+ if (!slp && !STMT_VINFO_STRIDED_P (stmt_info))
{
if (vect_load_lanes_supported (vectype, group_size))
load_lanes_p = true;
}
else if (STMT_VINFO_STRIDED_P (stmt_info))
{
- if ((grouped_load
- && (slp || PURE_SLP_STMT (stmt_info)))
+ if (grouped_load
+ && slp
&& (group_size > nunits
|| nunits % group_size != 0))
{
int nunits = TYPE_VECTOR_SUBPARTS (vectype);
tree vectype1 = NULL_TREE, vectype2 = NULL_TREE;
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-bool
+static bool
vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
gimple **vec_stmt, tree reduc_def,
slp_tree slp_node)
mask_type = vectype;
nunits = TYPE_VECTOR_SUBPARTS (vectype);
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
bool done;
+ gcc_assert (slp_node || !PURE_SLP_STMT (stmt_info));
gimple *old_vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
switch (STMT_VINFO_TYPE (stmt_info))