[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #15 from Sam James  ---
(The workaround flags could be reduced but at this point I just wanted a quick
workaround.)

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Sam James  changed:

   What|Removed |Added

Summary|[12/13/14 regression]   |[12/13 regression]
   |llvm-tblgen miscompiled on  |llvm-tblgen miscompiled on
   |powerpc-unknown-linux-gnu   |powerpc-unknown-linux-gnu
   |since   |since
   |r12-5383-g22c242342e38eb|r12-5383-g22c242342e38eb
   See Also||https://bugs.gentoo.org/sho
   ||w_bug.cgi?id=880677,
   ||https://bugs.gentoo.org/sho
   ||w_bug.cgi?id=875776

--- Comment #14 from Sam James  ---
This seems "fixed" by r14-1909-g5a1ef1cfac0053. As a workaround, -fno-ipa-sra
-fno-ipa-modref -fno-ipa-icf works for GCC 12/13.

I don't really intend on spending more time on this though. I've got better at
debugging miscompilations since we filed this, but LLVM is still huge and not
easy for me to tackle.

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2023-03-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
 Ever confirmed|0   |1
   Last reconfirmed|2022-12-29 00:00:00 |2023-03-27

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2023-01-13 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Segher Boessenkool  changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org

--- Comment #11 from Segher Boessenkool  ---
Please figure out what code is miscompiled?  And then get us a reproducer?
Without that, it is just "my program does not do what I want it to"...

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2023-01-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |12.3

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2023-01-02 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #10 from Sam James  ---
Both Arsen and I gave it a go and it doesn't seem to make a difference either
way (it doesn't induce miscompilation with the revert, and it doesn't fix
miscompilation without the revert).

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2023-01-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #9 from Andrew Pinski  ---
There is one more thing to test -fno-lifetime-dse .

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2023-01-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |UNCONFIRMED
 Ever confirmed|1   |0

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-29 Thread arsen at aarsen dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #8 from Arsen Arsenović  ---
Created attachment 54166
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54166=edit
xz'd preprocessed CodeGenDagPatterns.cpp

Cmdline: [220/231] /usr/bin/g++-12 -DGTEST_HAS_RTTI=0 -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/root/llvm-project/bisect-maybe-broken/utils/TableGen
-I/root/llvm-project/llvm/utils/TableGen
-I/root/llvm-project/bisect-maybe-broken/include
-I/root/llvm-project/llvm/include -O2 -mcpu=powerpc -mtune=powerpc -pipe -ggdb
-D_GLIBCXX_ASSERTIONS=1 -fPIC -fno-semantic-interposition
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough
-Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor
-Wsuggest-override -Wno-comment -Wno-misleading-indentation
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections
-fdata-sections -O2 -g -DNDEBUG  -fno-exceptions -fno-rtti -std=c++17
-save-temps=cwd -MD -MT
utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o -MF
utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o.d -o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o -c
/root/llvm-project/llvm/utils/TableGen/CodeGenDAGPatterns.cpp

This is preprocessed by the version with a revert, so the produced assembly
does work, but I have doubts that this matters (copying in the compile from the
bad case and linking against these files still acts like the bad case).

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-29 Thread arsen at aarsen dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #7 from Arsen Arsenović  ---
Created attachment 54165
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54165=edit
hang-testing script

With the attached script, I singled out
utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o.  For
context, bisect-maybe-broken-2022-12-28-hangs is a build directory that
contains files built with the "bad" gcc version (in this instance, GCC: (Gentoo
12.2.1, commit a3fbfc1027e9edcd14bb290b5702504d80d9e8fe) 12.2.1 20221227),
which causes tblgen to run for longer than one minute and then get timed out
(whereas it normally exits within five seconds).

I also find it quite odd that -fdump-ipa-all didn't cause the build to
reproduce before the revert.  I can definitely see a bunch of IPA-pass dump
files in the build directory

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #6 from Sam James  ---
For completeness, I should note, because some commits couldn't be built (only a
handful), git said (I've converted the commits) that it could be any of:
r12-5382-g616ca1024a79c6
r12-5383-g22c242342e38eb
r12-5381-g53c964ad996a1b
r12-5384-g3535be6c6f4409
r12-5380-g75ac95f6647367
r12-5385-g6f4ac4f81f89ca

I then verified it's r12-5383-g22c242342e38eb by going back to releases/gcc-12
and retrying a few times by applying/reverting it, but maybe there's something
useful in this list anyway.

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #5 from Sam James  ---
(In reply to Andrew Pinski from comment #4)
> Do you know which object file inside llvm-tblgen is being miscompiled?
> You can do a binary search on object files and then provide the preprocessed
> source for that one.

Will try find out.

> 
> Also could you reproduce the miscompiling with reverting and with
> -fdump-ipa-all ? I suspect you could ...

No, interestingly, it works (no hangs) if I use -fdump-ipa-all in the flags to
build LLVM. I double checked as I was a bit surprised.

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2022-12-29
 Status|UNCONFIRMED |WAITING

--- Comment #4 from Andrew Pinski  ---
Do you know which object file inside llvm-tblgen is being miscompiled?
You can do a binary search on object files and then provide the preprocessed
source for that one.

Also could you reproduce the miscompiling with reverting and with
-fdump-ipa-all ? I suspect you could ...