From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 961B73858416; Fri, 22 Oct 2021 07:30:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 961B73858416 From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/102681] [12 Regression] AArch64 bootstrap failure Date: Fri, 22 Oct 2021 07:30:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: build, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 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: Fri, 22 Oct 2021 07:30:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102681 --- Comment #19 from Aldy Hernandez --- (In reply to Andrew Pinski from comment #16) > (In reply to Andrew Pinski from comment #15) > > We totally missed the jump threading of 3->5->7 path and the 4->5->8 pa= th. >=20 > FAIL: path through PHI in bb8 (incoming bb:6) crosses loop >=20 > But but, it does not exactly cross the loop as 5 (6) is not part of the l= oop > but rather just 8. Interesting. The restriction that tickles this is old legacy code in place from way before I touched any of this: // This is like path_crosses_loops in profitable_path_p but more // restrictive, since profitable_path_p allows threading the // first block because it would be redirected anyhow. // // If we loosened the restriction and used profitable_path_p() // here instead, we would peel off the first iterations of loops // in places like tree-ssa/pr14341.c. bool profitable_p =3D m_path[0]->loop_father =3D=3D e->src->loop_fath= er; if (!profitable_p && 0) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " FAIL: path through PHI in bb%d (incoming bb:%d) cro= sses loop\n", e->dest->index, e->src->index); continue; } I even annotated it because it seemed strange that it was more restrictive = than the generic restrictions in the backward threader. It is very possible that we can remove this, as we have much more thorough = loop restrictions in place in the shared registry. If you remove the above chunk, does it work? If so, I may have to test and benchmark the change.=