https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115723
--- Comment #18 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:64a6c0d594c05f275de91df35047cffb3ccecf2f commit r14-10394-g64a6c0d594c05f275de91df35047cffb3ccecf2f Author: Richard Biener <rguent...@suse.de> Date: Mon Jul 1 10:06:55 2024 +0200 tree-optimization/115723 - ICE with .COND_ADD reduction The following fixes an ICE with a .COND_ADD discovered as reduction even though its else value isn't the reduction chain link but a constant. This would be wrong-code with --disable-checking I think. PR tree-optimization/115723 * tree-vect-loop.cc (check_reduction_path): For a .COND_ADD verify the else value also refers to the reduction chain op. * gcc.dg/vect/pr115723.c: New testcase. (cherry picked from commit 286cda3461d6f5ce7d911d3f26bd4975ea7ea11d)