-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should document gcc 3.4.4 as known-broken on x86-64 #1428
Comments
I've tried to run all optimization passes, which llvm-gcc actually runs.
./opt -verify -lowersetjmp -funcresolve -raiseallocs -simplifycfg and check, whether llc crashes. (This is the full list of optimizations run by llvm-gcc4 at -O2) |
The crash does occur with -O1. Only -O0 compiles successfully. The opt command you give does crash on my machine (llc never sees any bytecode). (gdb) where Looks like stack corruption. |
Well, there are 4 instcombine's in the list. Could you please find, which one Also, try "bugpoint -find-bugs oldbytecode.bc" to get somehow reduced bytecode. |
Simplified bytecode file causing crash opt bugpoint-reduced-simplified.bc -instcombine But probably not on your machine. It may be reproducible only on x86_64 |
Nope, it doesn't crash for me on 32-bit Windows built with VC++. |
No crash here too (gcc/linux and gcc-mingw32/windows). |
Jeff, since you've got the only platform on which this fails, could you please |
Alternatively, can you include the output of 'opt -instcombine -debug' on the .bc file? Thanks, -Chris |
Output from opt -instcombine -debug: IC: Old = %tmp41 = getelementptr %struct.DWstruct* %tmp40, int 0, uint 0 |
Very strange. Okay, please try this: gdb --args opt -debug -instcombine bugpoint.xxx.bc
Just keep nexting until you crash, it shouldn't be too long. When it crashes, please info about the code Thanks Jeff, -Chris |
GDB session |
Okay, this is even more confusing :( It looks like there is a bogus instruction being put on the worklist. I can't reproduce this, and nicholas If not, can I get access to a jail or something to track this down? -Chris |
I suspect that this is related to Bug 1063, which I think is GCC miscompiling LLVM when targetting -Chris |
The problem disappears when building with gcc 4.0.4 (instead of the 3.4.4 that However, there are still other problems. There appear to be some scripting checking whether llvm-gcc is sane... yes This isn't the only place the "unexpected operator" occurs: checking for sin in -lm... yes |
Very interesting. We should add x86-64 3.4.4 to know "known bad" list of GCC's |
Shouldn't this be closed? GCC 3.4.x is definitely generating bad x86_64 code. GCC 4.0.x works. I already |
Yes, you're right, patch here: |
Extended Description
The last file compiled during the build of llvm-gcc when it crashes:
/usr/home/jeffc/llvm-gcc/obj/gcc/xgcc -B/usr/home/jeffc/llvm-gcc/obj/gcc/
-B/home/jeffc/llvm-gcc/install/amd64-unknown-freebsd6.1/bin/
-B/home/jeffc/llvm-gcc/install/amd64-unknown-freebsd6.1/lib/ -isystem
/home/jeffc/llvm-gcc/install/amd64-unknown-freebsd6.1/include -isystem
/home/jeffc/llvm-gcc/install/amd64-unknown-freebsd6.1/sys-include -O2 -DIN_GCC
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -isystem ./include -fPIC -pthread -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc
-I../../gcc/. -I../../gcc/../include -I./../intl -I../../gcc/../libcpp/include
-I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include -DL_lshrdi3 -c
../../gcc/libgcc2.c -o libgcc/./_lshrdi3.o
WARNING: 128-bit integers not supported!
../../gcc/libgcc2.c: In function '__lshrti3':
../../gcc/libgcc2.c:412: internal compiler error: Segmentation fault: 11
This is apparently due to an optimization bug in LLVM. The crash goes away if
the -O2 option is removed. The preprocessed version of the file, as well as the
bytecode file produced with -emit-llvm -O0 is attached.
The text was updated successfully, but these errors were encountered: