re PR tree-optimization/65930 (Reduction with sign-change not handled)
authorRichard Biener <rguenther@suse.de>
Wed, 30 Oct 2019 09:21:09 +0000 (09:21 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 30 Oct 2019 09:21:09 +0000 (09:21 +0000)
commitb4673569c2a8b974e3f84ffaa547941c5d40cfe5
tree6d7ec270bf5b9c3eba3ecbbab321a2c4ef3ef3b1
parent91c4891af8f7edd32689a9917db5ae81f4ab0c72
re PR tree-optimization/65930 (Reduction with sign-change not handled)

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

PR tree-optimization/65930
* tree-vect-loop.c (vect_is_simple_reduction): For reduction
chains also allow a leading and trailing conversion.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Handle
intermediate reduction chains.
(vect_analyze_slp_instance): Likewise.  Build a SLP
node for a trailing conversion manually.

* gcc.dg/vect/pr65930-2.c: New testcase.

From-SVN: r277603
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr65930-2.c [new file with mode: 0644]
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c