tree-optimization/103544 - SLP reduction chain as SLP reduction issue
authorRichard Biener <rguenther@suse.de>
Mon, 6 Dec 2021 10:43:28 +0000 (11:43 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 6 Dec 2021 11:53:43 +0000 (12:53 +0100)
commitee01694151edc7e8aef84dc3c484469e2ae443a0
tree8dac6e8627ccf2188c24618f4f43d203ca8a1ea5
parent4dc6d19222581c77a174d44d97507d234fb7e39b
tree-optimization/103544 - SLP reduction chain as SLP reduction issue

When SLP reduction chain vectorization support added handling of
an outer conversion in the chain picking a failed reduction up
as SLP reduction that broke the invariant that the whole reduction
was forward reachable.  The following plugs that hole noting
a future enhancement possibility.

2021-12-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/103544
* tree-vect-slp.c (vect_analyze_slp): Only add a SLP reduction
opportunity if the stmt in question is the reduction root.
(dot_slp_tree): Add missing check for NULL child.

* gcc.dg/vect/pr103544.c: New testcase.
gcc/testsuite/gcc.dg/vect/pr103544.c [new file with mode: 0644]
gcc/tree-vect-slp.c