https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118269
--- Comment #7 from GCC 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:2dd4eb15b63ca1f20a637e8b26567d5064a43a4f commit r15-6683-g2dd4eb15b63ca1f20a637e8b26567d5064a43a4f Author: Richard Biener <rguent...@suse.de> Date: Tue Jan 7 11:15:43 2025 +0100 tree-optimization/118269 - SLP reduction chain and early breaks When we create the SLP reduction chain epilogue for the PHIs for the early exit we fail to properly classify the reduction as SLP reduction chain. The following fixes the corresponding checks. PR tree-optimization/118269 * tree-vect-loop.cc (vect_create_epilog_for_reduction): Use the correct stmt for the REDUC_GROUP_FIRST_ELEMENT lookup. * gcc.dg/vect/vect-early-break_131-pr118269.c: New testcase.