From bed8b93be659c8b8bb94001842533cdd5cbf460d Mon Sep 17 00:00:00 2001 From: irar Date: Sun, 5 Feb 2012 05:58:18 +0000 Subject: PR tree-optimization/52091 * tree-vectorizer.h (vect_is_simple_use): Add an argument. (vect_is_simple_use_1): Likewise. * tree-vect-loop.c (vectorizable_reduction): Update calls to vect_is_simple_use_1 and vect_is_simple_use. (vectorizable_live_operation): Likewise. * tree-vect-patterns.c (widened_name_p, vect_recog_vector_vector_shift_pattern, check_bool_pattern): Likewise. * tree-vect-stmts.c (process_use, vect_get_vec_def_for_operand, vectorizable_call, vectorizable_conversion, vectorizable_assignment, vectorizable_shift, vectorizable_operation, vectorizable_store, vectorizable_load): Likewise. (vect_is_simple_cond): Add an argument, pass it to vect_is_simple_use_1. (vectorizable_condition): Update calls to vect_is_simple_cond, vect_is_simple_use. (vect_is_simple_use): Add an argument, the statement in which OPERAND is used. Check that if OPERAND's def stmt is a double reduction phi node, the use is a phi node too. (vect_is_simple_use_1): Add an argument, pass it to vect_is_simple_use. * tree-vect-slp.c (vect_get_and_check_slp_defs): Update a call to vect_is_simple_use. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183902 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-vect-patterns.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gcc/tree-vect-patterns.c') diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index f63b4e593cc..d95502103f7 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -109,7 +109,8 @@ widened_name_p (tree name, gimple use_stmt, tree *half_type, gimple *def_stmt, stmt_vinfo = vinfo_for_stmt (use_stmt); loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo); - if (!vect_is_simple_use (name, loop_vinfo, NULL, def_stmt, &def, &dt)) + if (!vect_is_simple_use (name, use_stmt, loop_vinfo, NULL, def_stmt, &def, + &dt)) return false; if (dt != vect_internal_def @@ -133,8 +134,8 @@ widened_name_p (tree name, gimple use_stmt, tree *half_type, gimple *def_stmt, || (TYPE_PRECISION (type) < (TYPE_PRECISION (*half_type) * 2))) return false; - if (!vect_is_simple_use (oprnd0, loop_vinfo, NULL, &dummy_gimple, &dummy, - &dt)) + if (!vect_is_simple_use (oprnd0, *def_stmt, loop_vinfo, + NULL, &dummy_gimple, &dummy, &dt)) return false; return true; @@ -1550,7 +1551,8 @@ vect_recog_vector_vector_shift_pattern (VEC (gimple, heap) **stmts, != TYPE_PRECISION (TREE_TYPE (oprnd0))) return NULL; - if (!vect_is_simple_use (oprnd1, loop_vinfo, NULL, &def_stmt, &def, &dt)) + if (!vect_is_simple_use (oprnd1, last_stmt, loop_vinfo, NULL, &def_stmt, + &def, &dt)) return NULL; if (dt != vect_internal_def) @@ -1926,7 +1928,7 @@ check_bool_pattern (tree var, loop_vec_info loop_vinfo) tree def, rhs1; enum tree_code rhs_code; - if (!vect_is_simple_use (var, loop_vinfo, NULL, &def_stmt, &def, &dt)) + if (!vect_is_simple_use (var, NULL, loop_vinfo, NULL, &def_stmt, &def, &dt)) return false; if (dt != vect_internal_def) -- cgit v1.2.1