aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-06-26 10:08:58 +0200
committerRichard Biener <rguenther@suse.de>2020-06-26 13:04:21 +0200
commit5b959c22bc0158faa359a5899bf46e815dc65290 (patch)
treed82541e9a266920e6b853dd68010261ae7e6a6de /gcc/tree-vect-stmts.c
parent87fce92c5c3660a08172a9e29faf54573cedd9ae (diff)
downloadgcc-5b959c22bc0158faa359a5899bf46e815dc65290.zip
gcc-5b959c22bc0158faa359a5899bf46e815dc65290.tar.gz
gcc-5b959c22bc0158faa359a5899bf46e815dc65290.tar.bz2
tree-optimization/95897 - fix fold-left SLP reduction insert place
This fixes computation of the insertion place for fold-left SLP reductions where the PHIs do not have vectorized stmts. The SLP representation isn't perfect here thus the following. 2020-06-26 Richard Biener <rguenther@suse.de> PR tree-optimization/95897 * tree-vectorizer.h (vectorizable_induction): Remove unused gimple_stmt_iterator * parameter. * tree-vect-loop.c (vectorizable_induction): Likewise. (vect_analyze_loop_operations): Adjust. * tree-vect-stmts.c (vect_analyze_stmt): Likewise. (vect_transform_stmt): Likewise. * tree-vect-slp.c (vect_schedule_slp_instance): Adjust for fold-left reductions, clarify existing reduction case. * gcc.dg/vect/pr95897.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index edd2853..9b7b04c 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -10549,7 +10549,7 @@ vect_analyze_stmt (vec_info *vinfo,
|| vectorizable_reduction (as_a <loop_vec_info> (vinfo), stmt_info,
node, node_instance, cost_vec)
|| vectorizable_induction (as_a <loop_vec_info> (vinfo), stmt_info,
- NULL, NULL, node, cost_vec)
+ NULL, node, cost_vec)
|| vectorizable_shift (vinfo, stmt_info, NULL, NULL, node, cost_vec)
|| vectorizable_condition (vinfo, stmt_info,
NULL, NULL, node, cost_vec)
@@ -10631,7 +10631,7 @@ vect_transform_stmt (vec_info *vinfo,
case induc_vec_info_type:
done = vectorizable_induction (as_a <loop_vec_info> (vinfo),
- stmt_info, gsi, &vec_stmt, slp_node,
+ stmt_info, &vec_stmt, slp_node,
NULL);
gcc_assert (done);
break;