]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/116647 - wrong classified double reduction
authorRichard Biener <rguenther@suse.de>
Mon, 9 Sep 2024 09:51:24 +0000 (11:51 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 9 Sep 2024 10:59:38 +0000 (12:59 +0200)
commit898e3e95a6acf542baf03be95ce5bf7b3ad04276
tree1d78ccbd81f41a6dbc3211ca5578ec0dc5f328ab
parent0171793aca4c0d4e9c8020c539bb4d3abfb91da7
tree-optimization/116647 - wrong classified double reduction

The following avoids classifying a double reduction that's not
actually a reduction in the outer loop (because its value isn't
used outside of the outer loop).  This avoids us ICEing on the
unexpected stmt/SLP node arrangement.

PR tree-optimization/116647
* tree-vect-loop.cc (vect_is_simple_reduction): Add missing
check to double reduction detection.

* gcc.dg/torture/pr116647.c: New testcase.
* gcc.dg/vect/no-scevccp-pr86725-2.c: Adjust expected pattern.
* gcc.dg/vect/no-scevccp-pr86725-4.c: Likewise.
gcc/testsuite/gcc.dg/torture/pr116647.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/no-scevccp-pr86725-2.c
gcc/testsuite/gcc.dg/vect/no-scevccp-pr86725-4.c
gcc/tree-vect-loop.cc
This page took 0.065068 seconds and 5 git commands to generate.