tree-optimization/95866 - avoid vectorizing uniform SLP subgraphs
authorRichard Biener <rguenther@suse.de>
Wed, 24 Jun 2020 13:49:00 +0000 (15:49 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 24 Jun 2020 17:49:16 +0000 (19:49 +0200)
commitc78907d514d65483c7ddfb4cb1f5c57f23da73d9
tree2936ed9c1ed2cff0e6208f00255916b49aea0377
parent796190e538c96c28b5803f6d3dab1add87950c0e
tree-optimization/95866 - avoid vectorizing uniform SLP subgraphs

This avoids vectorizing SLP subgraphs that just compute uniform
operations on all-same operands.  That fixes the less interesting
(but most embarrasing) part of the testcase in the PR.  On the
way it also fixed a missing matches[0] reset in the last
refactoring touching that place.

2020-06-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/95866
* tree-vect-slp.c (vect_slp_tree_uniform_p): New.
(vect_build_slp_tree_2): Properly reset matches[0],
ignore uniform constants.

* gcc.target/i386/pr95866-1.c: New testcase.
gcc/testsuite/gcc.target/i386/pr95866-1.c [new file with mode: 0644]
gcc/tree-vect-slp.c