tree-optimization/103237 - avoid vectorizing unhandled double reductions
authorRichard Biener <rguenther@suse.de>
Mon, 15 Nov 2021 10:37:56 +0000 (11:37 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 15 Nov 2021 12:07:57 +0000 (13:07 +0100)
commit220bd61874cf114667b44f9ded76ed0639eb278b
treee7fdc16ddcbe8866feed8fd504911e09024b0ddc
parent4d281ff7ddd8f6365943c0a622107f92315bb8a6
tree-optimization/103237 - avoid vectorizing unhandled double reductions

Double reductions which have multiple LC PHIs in the inner loop
are not handled correctly during transformation since those PHIs
are not properly classified as reduction.  The following disables
vectorizing them.

2021-11-15  Richard Biener  <rguenther@suse.de>

PR tree-optimization/103237
* tree-vect-loop.c (vect_is_simple_reduction): Fail for
double reductions with multiple inner loop LC PHI nodes.

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