From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8E0D385840D; Wed, 24 Apr 2024 06:12:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8E0D385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713939139; bh=aZiulwviQDc+ymYAyVVmH9Y2TNImF8SFZ7EVcTWJtzg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=isCuasQDD70Z60X3uFgzRtk+rdNj2bDh5OBR8ts68F2COB0dqLsbPS2EcuESnXN+0 jAlXOPhadNhtU06rwpm4699FlcEL2kck9K7UU7SxZFpApgiPKFga8MA2nCryg2dePd qDgiSR/7UPd3KYkWTnq+436PBGtpvRMNGzQRhvcE= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114787] [13/14 Regression] wrong code at -O1 on x86_64-linux-gnu (the generated code hangs) Date: Wed, 24 Apr 2024 06:12:19 +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: 14.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: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114787 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org Status|NEW |ASSIGNED --- Comment #14 from Richard Biener --- (In reply to Jan Hubicka from comment #13) > -fdump-tree-all-all changing generated code is also bad. We probably > should avoid dumping loop bounds then they are not recorded. I added dump= ing > of loop bounds and this may be unexpected side effect. WIll take a look. I think consistently estimating the number of iterations here is correct. I don't think the bug should be P1, it's latent and exposed only with an artificial testcase. We've likely had similar bugs before where we end up associating estimates with a wrong loop after some CFG transform. In this case we end up with the i-loop header being associated with a former irreducible region. The fix in the past was to release estimates/niters on problematic transforms. Let me have a look.=