https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114551
--- 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:e152177b362143465e2b9d721ea632cae3f13445 commit r14-9781-ge152177b362143465e2b9d721ea632cae3f13445 Author: Richard Biener <rguent...@suse.de> Date: Wed Apr 3 14:53:30 2024 +0200 tree-optimization/114551 - loop splitting and undefined overflow When loop splitting hoists a guard computation it needs to make sure that can be safely evaluated at this place when it was previously only conditionally evaluated. The following fixes this for the case of undefined overflow. PR tree-optimization/114551 * tree-ssa-loop-split.cc (split_loop): If the guard is only conditionally evaluated rewrite computations with possibly undefined overflow to unsigned arithmetic. * gcc.dg/torture/pr114551.c: New testcase.