tree-vect-loop.c (vect_valid_reduction_input_p): Remove.
authorRichard Biener <rguenther@suse.de>
Wed, 16 Oct 2019 14:21:06 +0000 (14:21 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 16 Oct 2019 14:21:06 +0000 (14:21 +0000)
commitaab8c2fd6542a52663243eec160b80bdd61516d5
treea02f519c98c98384942081ea85ded7d9a8fee137
parent1624d351f14049bfe08bc2c86c63a9cccfb43ab8
tree-vect-loop.c (vect_valid_reduction_input_p): Remove.

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

* tree-vect-loop.c (vect_valid_reduction_input_p): Remove.
(vect_is_simple_reduction): Delay checking to
vectorizable_reduction and relax the checking.
(vectorizable_reduction): Check we have a simple use.  Check
for bogus condition reductions.
* tree-vect-stmts.c (vect_transform_stmt): Make sure we
are looking at the last stmt in a pattern sequence when
filling in backedge PHI values.

* gcc.dg/vect/vect-cond-reduc-3.c: New testcase.
* gcc.dg/vect/vect-cond-reduc-4.c: Likewise.

From-SVN: r277067
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-cond-reduc-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c [new file with mode: 0644]
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c