https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119096
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:d3e4c092c4f167d3c3ae8aa59d273b0202cef6cf commit r14-11518-gd3e4c092c4f167d3c3ae8aa59d273b0202cef6cf Author: Richard Biener <rguent...@suse.de> Date: Mon Mar 3 14:12:37 2025 +0100 tree-optimization/119096 - bogus conditional reduction vectorization When we vectorize a .COND_ADD reduction and apply the single-use-def cycle optimization we can end up chosing the wrong else value for subsequent .COND_ADD. The following rectifies this. PR tree-optimization/119096 * tree-vect-loop.cc (vect_transform_reduction): Use the correct else value for .COND_fn. * gcc.dg/vect/pr119096.c: New testcase. (cherry picked from commit 10e4107dfcf9fe324d0902f16411a75c596dab91)