public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/108250] New: [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb
@ 2022-12-28 23:35 sam at gentoo dot org
  2022-12-28 23:55 ` [Bug c/108250] " sam at gentoo dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: sam at gentoo dot org @ 2022-12-28 23:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

            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 too.

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 hang
for several of them).
2. For X86, it'll give invalid output which later causes the LLVM compilation
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).

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-03-28  3:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28 23:35 [Bug c/108250] New: [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb sam at gentoo dot org
2022-12-28 23:55 ` [Bug c/108250] " sam at gentoo dot org
2022-12-29  0:04 ` sam at gentoo dot org
2022-12-29  0:06 ` sam at gentoo dot org
2022-12-29  2:13 ` [Bug ipa/108250] " pinskia at gcc dot gnu.org
2022-12-29  2:48 ` sam at gentoo dot org
2022-12-29  3:14 ` sam at gentoo dot org
2022-12-29 16:54 ` arsen at aarsen dot me
2022-12-29 17:22 ` arsen at aarsen dot me
2023-01-02  3:44 ` pinskia at gcc dot gnu.org
2023-01-02  3:46 ` pinskia at gcc dot gnu.org
2023-01-03  1:18 ` sam at gentoo dot org
2023-01-09 14:09 ` rguenth at gcc dot gnu.org
2023-01-13 16:59 ` segher at gcc dot gnu.org
2023-03-27 12:27 ` rguenth at gcc dot gnu.org
2023-05-08 12:26 ` [Bug ipa/108250] [12/13/14 " rguenth at gcc dot gnu.org
2023-05-14 12:06 ` arsen at gcc dot gnu.org
2024-03-28  3:27 ` [Bug ipa/108250] [12/13 " sjames at gcc dot gnu.org
2024-03-28  3:31 ` sjames at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).