-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
clang never finishes on one particular C++ file #57164
Comments
To reproduce feed the attached file to llc. It hangs in clang++ -fno-strict-aliasing -fno-omit-frame-pointer -march=native -O3 -fPIC -emit-llvm on the original file you get an IR file that causes llc to hang. From there I narrowed down the crash by dumping after each pass. The file is from the last pass that didn't hang. You need the clang++ from LLVM 14 because the builtins changed in LLVM 15. Both 14 and 15 llc hang. Target is amd64. |
Not reproduce with the current trunk - https://godbolt.org/z/PzdPdvrcz.. |
@xgupta |
No it is Linux system. |
C++ bugs like this likely depend on the C++ library that is used, which is different on FreeBSD. |
Run llc on the IR file I attached. llc hangs at -O1, -O2, or with default optimization. llc completes in a second or two at -O0. Verified on FreeBSD/amd64, FreeBSD/arm64, and Linux/amd64. Apparently at all versions from 14 up to latest trunk. I forgot to include a target triple in the IR file. It would have been generated on FreeBSD/amd64. This is not a FreeBSD-specific bug. It is a codegen bug that happens to be triggered by libraries and headers on a FreeBSD system. |
It is worth mentioning that the IR file contains a basic block with about 43,000 instructions and 40,000 values. The "hang" may in fact be a superlinear run time. Whatever optimization it is attempting should be disabled when the block size is so large. |
unity_1935_cxx.cxx.E.cxx.bz2
FreeBSD bug report.
The text was updated successfully, but these errors were encountered: