tree-vect-loop.c (needs_fold_left_reduction_p): Export.
authorRichard Biener <rguenther@suse.de>
Thu, 17 Oct 2019 11:48:45 +0000 (11:48 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 17 Oct 2019 11:48:45 +0000 (11:48 +0000)
commitaa9dffac731d0359a0e7a925ff8f4a1bef182eac
tree63f122fab3cd3141e4f8ebbfc2cd06115b7ee28b
parent728ece16a633863c0a2f78239dc2679167b099dc
tree-vect-loop.c (needs_fold_left_reduction_p): Export.

2019-10-17  Richard Biener  <rguenther@suse.de>

* tree-vect-loop.c (needs_fold_left_reduction_p): Export.
(vect_is_simple_reduction): Move all validity checks ...
(vectorizable_reduction): ... here.  Compute whether we
need a fold-left reduction here.
* tree-vect-patterns.c (vect_reassociating_reduction_p): Merge
both overloads, check needs_fold_left_reduction_p directly.
* tree-vectorizer.h (needs_fold_left_reduction_p): Declare.

From-SVN: r277100
gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vect-patterns.c
gcc/tree-vectorizer.h