https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127152
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:2c87d96c31157ef45c0bb80b04c444d6891ef108 commit r17-3792-g2c87d96c31157ef45c0bb80b04c444d6891ef108 Author: Richard Biener <[email protected]> Date: Mon Aug 31 13:15:01 2026 +0200 tree-optimization/127152 - wrong-code with vectorized reduction The following avoids a mistake with r17-3692 by restoring the way vectype_in was computed, pushing down the vec_in_num compute before the input array is possibly mangled. PR tree-optimization/127152 * tree-vect-loop.cc (vect_transform_reduction): Restore vectype_in computation, compute vec_in_num from unaltered vec_oprnds. * gcc.dg/vect/vect-pr127152.c: New testcase.
