From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFEE7385801E; Thu, 17 Mar 2022 13:53:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFEE7385801E From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104931] [9/10/11 Regression] wrong-code with number_of_iterations_lt_to_ne Date: Thu, 17 Mar 2022 13:53:09 +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: 11.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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: Thu, 17 Mar 2022 13:53:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104931 --- Comment #9 from Richard Biener --- Created attachment 52646 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52646&action=3Dedit ivcanon dump from the GIMPLE testcase (without bug) The difference is that with LTO we have expanded expressions to Analyzing # of iterations of loop 1 exit condition [(struct TValue *) (_2 + 4294967272) + 12, + , 24](no_overflow) < _2 + 4294967272 while with the GIMPLE testcase we immediately get to Statement (exit)if (from_26 < to_27) is executed at most 0 (bounded by 0) + 1 times in loop 1. ... Loop 1 iterates 0 times. Note the GIMPLE FE doesn't yet support parsing CLOBBER stmts (but I'm quite sure this doesn't matter here) and for the loops() support you need to commit a pending patch.=