aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorIra Rosen <ira.rosen@linaro.org>2011-11-06 09:01:45 +0000
committerIra Rosen <irar@gcc.gnu.org>2011-11-06 09:01:45 +0000
commitf7e531cf982da6f84f670916abe453f993757c8d (patch)
tree6b7d1314dddf8d842d6c82f9e473a7263d89ac37 /gcc/tree-vect-loop.c
parent79cad86dca731ab4d8d0ea57e3436a4c7eca224d (diff)
downloadgcc-f7e531cf982da6f84f670916abe453f993757c8d.zip
gcc-f7e531cf982da6f84f670916abe453f993757c8d.tar.gz
gcc-f7e531cf982da6f84f670916abe453f993757c8d.tar.bz2
tree-vectorizer.h (vectorizable_condition): Add argument.
* tree-vectorizer.h (vectorizable_condition): Add argument. * tree-vect-loop.c (vectorizable_reduction): Fail for condition in SLP. Update calls to vectorizable_condition. * tree-vect-stmts.c (vect_is_simple_cond): Add basic block info to the arguments. Pass it to vect_is_simple_use_1. (vectorizable_condition): Add slp_node to the arguments. Support vectorization of basic blocks. Fail for reduction in SLP. Update calls to vect_is_simple_cond and vect_is_simple_use. Support SLP: call vect_get_slp_defs to get vector operands. (vect_analyze_stmt): Update calls to vectorizable_condition. (vect_transform_stmt): Likewise. * tree-vect-slp.c (vect_create_new_slp_node): Handle COND_EXPR. (vect_get_and_check_slp_defs): Handle COND_EXPR. Allow pattern def stmts. (vect_build_slp_tree): Handle COND_EXPR. (vect_analyze_slp_instance): Push pattern statements to root node. (vect_get_constant_vectors): Fix comments. Handle COND_EXPR. From-SVN: r181026
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 1598899..a209b4b 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -4416,6 +4416,9 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
gcc_unreachable ();
}
+ if (code == COND_EXPR && slp_node)
+ return false;
+
scalar_dest = gimple_assign_lhs (stmt);
scalar_type = TREE_TYPE (scalar_dest);
if (!POINTER_TYPE_P (scalar_type) && !INTEGRAL_TYPE_P (scalar_type)
@@ -4502,7 +4505,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
if (code == COND_EXPR)
{
- if (!vectorizable_condition (stmt, gsi, NULL, ops[reduc_index], 0))
+ if (!vectorizable_condition (stmt, gsi, NULL, ops[reduc_index], 0, NULL))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "unsupported condition in reduction");
@@ -4774,7 +4777,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
gcc_assert (!slp_node);
vectorizable_condition (stmt, gsi, vec_stmt,
PHI_RESULT (VEC_index (gimple, phis, 0)),
- reduc_index);
+ reduc_index, NULL);
/* Multiple types are not supported for condition. */
break;
}