https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116982
--- Comment #6 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:1d11536881e60f36a2b8ad9919169ac7a8bc0e3e commit r14-10813-g1d11536881e60f36a2b8ad9919169ac7a8bc0e3e Author: Richard Biener <rguent...@suse.de> Date: Mon Oct 7 11:05:17 2024 +0200 tree-optimization/116982 - analyze scalar loop exit early The following makes sure to discover the scalar loop IV exit during analysis as failure to do so (if DCE and friends are disabled this can happen due to if-conversion doing DCE and FRE on the if-converted loop) would ICE later. I refrained from larger refactoring to be able to eventually backport. PR tree-optimization/116982 * tree-vectorizer.h (vect_analyze_loop): Pass in .LOOP_VECTORIZED call. (vect_analyze_loop_form): Likewise. * tree-vect-loop.cc (vect_analyze_loop_form): Reject loops where we cannot determine a IV exit for the scalar loop. (vect_analyze_loop): Adjust. * tree-vectorizer.cc (try_vectorize_loop_1): Likewise. * tree-parloops.cc (gather_scalar_reductions): Likewise. (cherry picked from commit 9b86efd5210101954bd187c3aa8bb909610a5746)