https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131
Hongtao.liu <crazylht at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #13 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to CVS Commits from comment #11) > The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: > > https://gcc.gnu.org/g:f1af8528d34418bc874ae9d993ee0dc3559972d2 > > commit r12-6844-gf1af8528d34418bc874ae9d993ee0dc3559972d2 > Author: Richard Biener <rguent...@suse.de> > Date: Mon Jan 24 11:50:06 2022 +0100 > > tree-optimization/102131 - fix niter analysis wrt overflow > > This fixes the overflow issues seen with analyzing > BASE0 + STEP0 cmp BASE1 + STEP1 as BASE0 + STEP0 - STEP1 cmp BASE1 > by following the logic we have when simplifying comparisons. > > 2022-01-24 Richard Biener <rguent...@suse.de> > Jiufu Guo <guoji...@linux.ibm.com> > > PR tree-optimization/100740 > PR tree-optimization/101508 > PR tree-optimization/101972 > PR tree-optimization/102131 > * tree-ssa-loop-niter.cc (number_of_iterations_cond): Properly > constrain BASE0 + STEP0 cmp BASE1 + STEP1 to > BASE0 + STEP0 - STEP1 cmp BASE1 transform. > > * gcc.dg/torture/pr100740.c: New testcase. > * gcc.dg/torture/pr101508.c: Likewise. > * gcc.dg/torture/pr101972.c: Likewise. > * gcc.dg/torture/pr102131-1.c: Likewise. > * gcc.dg/torture/pr102131-2.c: Likewise. > * gcc.dg/torture/pr102131-3.c: Likewise. > * gcc.dg/torture/pr102131-4.c: Likewise. It regresses https://gcc.gnu.org/pipermail/gcc-regression/2022-January/076279.html