https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86991
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Fri Feb 8 14:38:31 2019 New Revision: 268699 URL: https://gcc.gnu.org/viewcvs?rev=268699&root=gcc&view=rev Log: 2019-02-08 Richard Biener <rguent...@suse.de> Backport from mainline 2018-11-13 Richard Biener <rguent...@suse.de> PR tree-optimization/86991 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction group building until we have successfully detected the SLP reduction. (vect_is_simple_reduction): Remove fixup code here. * gcc.dg/pr86991.c: New testcase. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr86991.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/tree-vect-loop.c