https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:05f98310b54da95e468d799f4a910174320cccbb commit r14-4588-g05f98310b54da95e468d799f4a910174320cccbb Author: Richard Biener <rguent...@suse.de> Date: Thu Oct 12 09:09:46 2023 +0200 tree-optimization/111764 - wrong reduction vectorization The following removes a misguided attempt to allow x + x in a reduction path, also allowing x * x which isn't valid. x + x actually never arrives this way but instead is canonicalized to 2 * x. This makes reduction path handling consistent with how we handle the single-stmt reduction case. PR tree-optimization/111764 * tree-vect-loop.cc (check_reduction_path): Remove the attempt to allow x + x via special-casing of assigns. * gcc.dg/vect/pr111764.c: New testcase.