aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog20
-rw-r--r--gcc/tree-vect-loop.c2
-rw-r--r--gcc/tree-vect-stmts.c41
-rw-r--r--gcc/tree-vectorizer.h2
4 files changed, 42 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a76178e..6eac48e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,23 @@
+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
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 153372b..1471658 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -5596,7 +5596,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
if (STMT_VINFO_LIVE_P (vinfo_for_stmt (reduc_def_stmt)))
return false;
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
ncopies = 1;
else
ncopies = (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 1252d33..d9e9cbb 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -2342,7 +2342,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
}
}
- 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;
@@ -2792,7 +2792,7 @@ vectorizable_simd_clone_call (gimple *stmt, gimple_stmt_iterator *gsi,
return false;
/* FORNOW */
- if (slp_node || PURE_SLP_STMT (stmt_info))
+ if (slp_node)
return false;
/* Process function arguments. */
@@ -3750,7 +3750,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
/* 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;
@@ -4231,7 +4231,7 @@ vectorizable_assignment (gimple *stmt, gimple_stmt_iterator *gsi,
/* 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;
@@ -4491,7 +4491,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
/* 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;
@@ -4922,7 +4922,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
/* 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;
@@ -5239,6 +5239,10 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
&& 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;
@@ -5250,7 +5254,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
/* 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;
@@ -5332,9 +5336,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
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;
@@ -5343,7 +5345,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
}
if (STMT_VINFO_STRIDED_P (stmt_info)
- && (slp || PURE_SLP_STMT (stmt_info))
+ && slp
&& (group_size > nunits
|| nunits % group_size != 0))
{
@@ -6252,7 +6254,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
/* 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;
@@ -6305,9 +6307,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
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;
@@ -6420,8 +6420,8 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
}
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))
{
@@ -7499,7 +7499,7 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
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;
@@ -7705,7 +7705,7 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
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)
@@ -7739,7 +7739,7 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
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;
@@ -8149,6 +8149,7 @@ vect_transform_stmt (gimple *stmt, gimple_stmt_iterator *gsi,
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))
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index bd1d55a..5816006 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -1004,8 +1004,6 @@ extern void vect_remove_stores (gimple *);
extern bool vect_analyze_stmt (gimple *, bool *, slp_tree);
extern bool vectorizable_condition (gimple *, gimple_stmt_iterator *,
gimple **, tree, int, slp_tree);
-extern bool vectorizable_comparison (gimple *, gimple_stmt_iterator *,
- gimple **, tree, int, slp_tree);
extern void vect_get_load_cost (struct data_reference *, int, bool,
unsigned int *, unsigned int *,
stmt_vector_for_cost *,