aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-06-15 11:07:47 +0000
committerJakub Jelinek <jakub@redhat.com>2012-06-15 11:07:47 +0000
commit2c18d87483cb9124da523f338f1edf3087b36397 (patch)
tree5c72c952d5e64996ab124de5c892988b2985f3d4 /gcc/tree-vect-stmts.c
parent3c559b7ed8b11017472b2513b639a8675b06c080 (diff)
PR tree-optimization/51581
* expr.h (choose_multiplier): New prototype. * expmed.c (choose_multiplier): No longer static. Change multiplier_ptr from rtx * to UHWI *. (expand_divmod): Adjust callers. * tree-vect-patterns.c (vect_recog_sdivmod_pow2_pattern): Renamed to... (vect_recog_divmod_pattern): ... this. Pass bb_vinfo as last argument to new_stmt_vec_info. Attempt to optimize also divisions by non-pow2 constants if integer vector division isn't supported. * tree-vect-stmts.c (vect_analyze_stmt): If node != NULL, don't look at pattern stmts and sequences. * gcc.c-torture/execute/pr51581-1.c: New test. * gcc.c-torture/execute/pr51581-2.c: New test. * gcc.dg/vect/pr51581-1.c: New test. * gcc.dg/vect/pr51581-2.c: New test. * gcc.dg/vect/pr51581-3.c: New test. * gcc.target/i386/avx-pr51581-1.c: New test. * gcc.target/i386/avx-pr51581-2.c: New test. * gcc.target/i386/avx2-pr51581-1.c: New test. * gcc.target/i386/avx2-pr51581-2.c: New test. * gcc.dg/vect/slp-26.c (main1): Divide by 0x8031 instead of 3. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@188656 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 9fa57e1985c..5853d4fdec9 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -5361,7 +5361,9 @@ vect_analyze_stmt (gimple stmt, bool *need_to_vectorize, slp_tree node)
Pattern statement needs to be analyzed instead of the original statement
if the original statement is not relevant. Otherwise, we analyze both
- statements. */
+ statements. In basic blocks we are called from some SLP instance
+ traversal, don't analyze pattern stmts instead, the pattern stmts
+ already will be part of SLP instance. */
pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
if (!STMT_VINFO_RELEVANT_P (stmt_info)
@@ -5390,6 +5392,7 @@ vect_analyze_stmt (gimple stmt, bool *need_to_vectorize, slp_tree node)
}
}
else if (STMT_VINFO_IN_PATTERN_P (stmt_info)
+ && node == NULL
&& pattern_stmt
&& (STMT_VINFO_RELEVANT_P (vinfo_for_stmt (pattern_stmt))
|| STMT_VINFO_LIVE_P (vinfo_for_stmt (pattern_stmt))))
@@ -5406,6 +5409,7 @@ vect_analyze_stmt (gimple stmt, bool *need_to_vectorize, slp_tree node)
}
if (is_pattern_stmt_p (stmt_info)
+ && node == NULL
&& (pattern_def_seq = STMT_VINFO_PATTERN_DEF_SEQ (stmt_info)))
{
gimple_stmt_iterator si;