From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD71A385843F; Mon, 8 Nov 2021 14:10:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD71A385843F From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/102997] [12 Regression] 45% 454.calculix regression with LTO+PGO -march=native -Ofast on Zen since r12-4526-gd8edfadfc7a9795b65177a50ce44fd348858e844 Date: Mon, 08 Nov 2021 14:10:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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, 08 Nov 2021 14:10:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102997 --- Comment #25 from Richard Biener --- (In reply to rguenther@suse.de from comment #24) > On Mon, 8 Nov 2021, hubicka at kam dot mff.cuni.cz wrote: >=20 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102997 > >=20 > > --- Comment #23 from hubicka at kam dot mff.cuni.cz --- > > > We verify that by simply looking at the loop depth relation of > > > the entry and exit of the path. > >=20 > > Which seem wrong for the path leaving loop and entering another... >=20 > True I guess. The path should end it the same loop as it starts > or end in a loop containing the start loop. Would have to double > check this. Yep, done: // The path should either start and end in the same loop or exit the // loop it starts in but never enter a loop. This also catches // creating irreducible loops, not only rotation. if (entry->src->loop_father !=3D exit->dest->loop_father && !flow_loop_nested_p (exit->src->loop_father, entry->dest->loop_father)) { cancel_thread (&path, "Path rotates loop"); return true; }=