https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112344
--- Comment #12 from CVS 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:a7d82b45edeed99a850595eee0e59d16c4df7aff commit r14-5813-ga7d82b45edeed99a850595eee0e59d16c4df7aff Author: Richard Biener <rguent...@suse.de> Date: Thu Nov 23 09:49:59 2023 +0100 tree-optimization/112344 - relax final value-replacement fix The following tries to reduce the number of cases we use an unsigned type for the addition when we know the original signed increment was OK which is when the total unsigned increment computed fits the signed type as well. This fixes the observed testsuite fallout. PR tree-optimization/112344 * tree-chrec.cc (chrec_apply): Only use an unsigned add when the overall increment doesn't fit the signed type.