From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB8893858437; Tue, 25 Jan 2022 01:28:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB8893858437 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136 Date: Tue, 25 Jan 2022 01:28:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2022 01:28:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102131 Hongtao.liu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #13 from Hongtao.liu --- (In reply to CVS Commits from comment #11) > The master branch has been updated by Richard Biener : >=20 > https://gcc.gnu.org/g:f1af8528d34418bc874ae9d993ee0dc3559972d2 >=20 > commit r12-6844-gf1af8528d34418bc874ae9d993ee0dc3559972d2 > Author: Richard Biener > Date: Mon Jan 24 11:50:06 2022 +0100 >=20 > tree-optimization/102131 - fix niter analysis wrt overflow >=20=20=20=20=20 > 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. >=20=20=20=20=20 > 2022-01-24 Richard Biener > Jiufu Guo >=20=20=20=20=20 > 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. >=20=20=20=20=20 > * 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=