From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 34BC3395C01D; Mon, 10 May 2021 11:06:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34BC3395C01D From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100492] [10/11/12 Regression] wrong code at -O3 (generated code hangs) Date: Mon, 10 May 2021 11:06:10 +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: cvs-commit 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: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Mon, 10 May 2021 11:06:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100492 --- Comment #7 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:60af2db18013a0339302928ba98fee893ccc1957 commit r12-661-g60af2db18013a0339302928ba98fee893ccc1957 Author: Richard Biener Date: Mon May 10 11:37:27 2021 +0200 tree-optimization/100492 - avoid irreducible regions in loop distributi= on When we distribute away a condition we rely on the ability to change it to either 1 !=3D 0 or 0 !=3D 0 depending on the direction of the exit branch in the respective loop. But when the loop contains an irreducible sub-region then for the conditions inside this this fails and can lead to infinite loops being generated. Avoid distibuting loops with irreducible sub-regions. 2021-05-10 Richard Biener PR tree-optimization/100492 * tree-loop-distribution.c (find_seed_stmts_for_distribution): Find nothing when the loop contains an irreducible region. * gcc.dg/torture/pr100492.c: New testcase.=