summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-06 10:05:07 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-06 10:05:07 +0000
commit1e845e91d47647aea50c643f65b68a47bc57dd82 (patch)
tree723393de4a7e8c3ab1da1417fcfd29afa36c6676 /gcc/tree-vect-loop.c
parent2f05705b18306164725d92d715329d0072badc18 (diff)
downloadgcc-1e845e91d47647aea50c643f65b68a47bc57dd82.tar.gz
2010-12-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46785 * tree-vect-loop.c (vect_is_simple_reduction_1): Also allow call statements as operand definition. * gcc.dg/vect/fast-math-vect-reduc-9.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167486 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 3aa77d6ec10..2644c9e4349 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -1970,6 +1970,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi,
&& (code == COND_EXPR
|| (def1 && flow_bb_inside_loop_p (loop, gimple_bb (def1))
&& (is_gimple_assign (def1)
+ || is_gimple_call (def1)
|| STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def1))
== vect_induction_def
|| (gimple_code (def1) == GIMPLE_PHI
@@ -1985,6 +1986,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi,
&& (code == COND_EXPR
|| (def2 && flow_bb_inside_loop_p (loop, gimple_bb (def2))
&& (is_gimple_assign (def2)
+ || is_gimple_call (def2)
|| STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def2))
== vect_induction_def
|| (gimple_code (def2) == GIMPLE_PHI