From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A9443858C60; Wed, 13 Oct 2021 06:44:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A9443858C60 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102711] [9/10/11 Regression] CDDCE removes condition that might lead to an infinite loop causing an unconditional infinite loop Date: Wed, 13 Oct 2021 06:44:16 +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: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority cc see_also keywords 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: Wed, 13 Oct 2021 06:44:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102711 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 CC| |rguenth at gcc dot gnu.org See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D99101 Keywords| |needs-bisection --- Comment #3 from Richard Biener --- Feels related to PR99101. We fail to mark the first if (!bar()) condition as useful. On trunk we happen to mark it when visiting control dependences of if (flag). A related commit _might_ be g:58ad6b2802592f1448eed48e8ad4e0e87985cecb Can somebody bisect whether that "fixed" the issue on trunk? Note that wasn't really a "fix" - but as PR99101 notes I have a hunch that the control dependence code doesn't behave like we want in the context of CD-DCE and infinite loops.=