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.
Showing
- gcc/testsuite/gcc.dg/torture/pr116647.c 22 additions, 0 deletionsgcc/testsuite/gcc.dg/torture/pr116647.c
- gcc/testsuite/gcc.dg/vect/no-scevccp-pr86725-2.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/vect/no-scevccp-pr86725-2.c
- gcc/testsuite/gcc.dg/vect/no-scevccp-pr86725-4.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/vect/no-scevccp-pr86725-4.c
- gcc/tree-vect-loop.cc 2 additions, 1 deletiongcc/tree-vect-loop.cc
Loading
Please register or sign in to comment