[10/n] PR85694: Split out check for vectorizable associative reductions
commitd04bd45a41920cc86d9e5eb9ed090f54c421141c
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 30 Jun 2018 12:47:50 +0000 (30 12:47 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 30 Jun 2018 12:47:50 +0000 (30 12:47 +0000)
tree861909cc49f297a0be9d745dec74c388098a21b0
parent142c320746aa3038df7dd28d5981fe42f969269d
[10/n] PR85694: Split out check for vectorizable associative reductions

This patch adds an overload of vect_reassociating_reduction_p
that checks for a vectorizable associative reduction,
since the check was duplicated in three functions.

2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
(vect_recog_widen_sum_pattern): Use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262274 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-vect-patterns.c