tree-vect-slp.c (vect_get_and_check_slp_defs): For reduction chains try harder with...
authorRichard Biener <rguenther@suse.de>
Thu, 24 Oct 2019 15:01:45 +0000 (15:01 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 24 Oct 2019 15:01:45 +0000 (15:01 +0000)
commit4352288a3df915575a2b820f702242908740106f
tree575af1eed28449217962628ae5ea192898d39358
parent5ce55f3ff5d04834e436a72fb2be84b31aa89def
tree-vect-slp.c (vect_get_and_check_slp_defs): For reduction chains try harder with operand swapping and instead of putting a...

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

* tree-vect-slp.c (vect_get_and_check_slp_defs): For reduction
chains try harder with operand swapping and instead of
putting a shifted chain into the reduction operands put
a repetition of the final reduction op there as if we'd
reassociate the expression.

* gcc.dg/vect/slp-reduc-10a.c: New testcase.
* gcc.dg/vect/slp-reduc-10b.c: Likewise.
* gcc.dg/vect/slp-reduc-10c.c: Likewise.
* gcc.dg/vect/slp-reduc-10d.c: Likewise.
* gcc.dg/vect/slp-reduc-10e.c: Likewise.

From-SVN: r277406
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/slp-reduc-10a.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/slp-reduc-10b.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/slp-reduc-10c.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/slp-reduc-10d.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/slp-reduc-10e.c [new file with mode: 0644]
gcc/tree-vect-slp.c