From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3CB153858D35; Wed, 28 Dec 2022 23:35:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3CB153858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672270511; bh=3VLLLOtRgpKjdeBPT6Iu0jbA6UScYgnZOEbofpfGssE=; h=From:To:Subject:Date:From; b=X/YUoND4Sv2iwec6xtBrgJzVPNfleZfnyeR2bH84ztgxVl95p2ijGGOK7Ka1coev4 qRQTdDNVALzThRvyhy+tpSPY6v3oahiI25Ck7PJq3A1teTxYyiUNXEm8rQ0LL1nph+ YIw5WUw2FPPa2jIJvlOFXEgQZYYN3LHL2fij8g8k= From: "sam at gentoo dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108250] New: [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb Date: Wed, 28 Dec 2022 23:35:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sam at gentoo dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: 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=3D108250 Bug ID: 108250 Summary: [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sam at gentoo dot org CC: marxin at gcc dot gnu.org Target Milestone: --- Host: powerpc-unknown-linux-gnu Target: powerpc-unknown-linux-gnu Build: powerpc-unknown-linux-gnu Originally reported downstream in Gentoo at https://bugs.gentoo.org/880677.= I forwarded it to LLVM at https://github.com/llvm/llvm-project/issues/59698 t= oo. With GCC 12 and newer, llvm-tblgen (which is built as part of the LLVM build process and used for part of the build) is miscompiled on powerpc-unknown-linux-gnu. GCC 11 and older are fine. It has two failure modes: 1. When producing a description for the PPC target in LLVM as: ``` bin/llvm-tblgen -I ~/llvm-project/llvm/lib/TargetPowerPC \ -I ~/llvm-project/llvm/include/ \ -I ~/llvm-project/llvm/lib/Target/PowerPC/ \ ~/llvm-project/llvm/lib/Target/PowerPC/PPC.td \ -o /dev/null \ --gen-dag-isel \ -d /dev/null \ --time-phases \ --write-if-changed ``` it'll regularly hang (not on all runs, but if you run it 10 times, it'll ha= ng for several of them). 2. For X86, it'll give invalid output which later causes the LLVM compilati= on to fail. For the purposes of tracking down which GCC commit caused it, we bisected by checking for timeouts in a loop. The result was r12-5383-g22c242342e38eb. Reverting 22c242342e38ebffa6bbf7e86e7a1e4abdf0d686 on top of releases/gcc-12 (at a3fbfc1027e9edcd14bb290b5702504d80d9e8fe) results in a built llvm-tblgen which doesn't hang. Please let me know what further information you require. Access to the environment is also available (it's purely a testing machine for this kind = of bug, no personal data on it).=