https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102087
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jiu Fu Guo <guoji...@gcc.gnu.org>: https://gcc.gnu.org/g:3087d1b0a2cbe8880ccbbb67744726ff4e5d390e commit r12-3791-g3087d1b0a2cbe8880ccbbb67744726ff4e5d390e Author: Jiufu Guo <guoji...@linux.ibm.com> Date: Wed Sep 22 13:20:29 2021 +0800 Set bound/cmp/control for until wrap loop. In patch r12-3136, niter->control, niter->bound and niter->cmp are derived from number_of_iterations_lt. While for 'until wrap condition', the calculation in number_of_iterations_lt is not align the requirements on the define of them and requirements in determine_exit_conditions. This patch calculate niter->control, niter->bound and niter->cmp in number_of_iterations_until_wrap. gcc/ChangeLog: 2021-09-22 Jiufu Guo <guoji...@linux.ibm.com> PR tree-optimization/102087 * tree-ssa-loop-niter.c (number_of_iterations_until_wrap): Update bound/cmp/control for niter. gcc/testsuite/ChangeLog: 2021-09-22 Jiufu Guo <guoji...@linux.ibm.com> * gcc.dg/pr102087.c: New test. PR tree-optimization/102087