https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117574
--- Comment #14 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:8764b8543b93494861bc034bb82af38db1688c8f commit r14-11004-g8764b8543b93494861bc034bb82af38db1688c8f Author: Richard Biener <rguent...@suse.de> Date: Fri Nov 15 11:56:14 2024 +0100 tree-optimization/117574 - bougs niter lt-to-ne When trying to change a IV from IV0 < IV1 to IV0' != IV1' we apply fancy adjustments to the may_be_zero condition we compute rather than using the obvious IV0->base >= IV1->base expression (to be able to use > instead of >=?). This doesn't seem to go well. PR tree-optimization/117574 * tree-ssa-loop-niter.cc (number_of_iterations_lt_to_ne): Use the obvious may_be_zero condition. * gcc.dg/torture/pr117574-1.c: New testcase. (cherry picked from commit ff5a14abeb31cd6bd0ca55e7043d05c8141a8c7f)