https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99253
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:65767abfdc07547b5435083a5af6ab085e013a4d commit r10-9447-g65767abfdc07547b5435083a5af6ab085e013a4d Author: Richard Biener <rguent...@suse.de> Date: Thu Feb 25 09:36:33 2021 +0100 tree-optimization/99253 - fix reduction path check This fixes an ordering problem with verifying that no intermediate computations in a reduction path are used outside of the chain. The check was disabled for value-preserving conversions at the tail but whether a stmt was a conversion or not was only computed after the first use. The following fixes this by re-ordering things accordingly. 2021-02-25 Richard Biener <rguent...@suse.de> PR tree-optimization/99253 * tree-vect-loop.c (check_reduction_path): First compute code, then verify out-of-loop uses. * gcc.dg/vect/pr99253.c: New testcase. (cherry picked from commit 1193d05465acd39b6e3c7095274d8351a1e2cd44)