-
Notifications
You must be signed in to change notification settings - Fork 171
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
Souper crash in codegen from valid transformation #812
Comments
we're never supposed to synthesize a phi, but that transformation seems to contain a new phi -- so the crash is correct but the optimization looks weird. can you isolate the code that leads to this transformation so we can understand what's going on here? |
%11 looks like it was supposed to be %4, so we need to understand how that happened. if %11 was %4 then we'd not have a new phi and we'd not get the crash. that looks like the bug to me. |
The 'block' should be same too. This is how to synthesize this with souper-check without involving sclang |
run under valgrind and such -- there could be an uninitialized bug that is causing things to get garbled. yes, the key question is why that block wasn't getting reused -- if that happened, it wouldn't look like we synthesized a phi on the RHS, which of course we did not. |
@manasij7479 reminder to fix this |
Given the following transformation (derived from spec17) in the redis cache:
And the following reduced source file:
Souper crashes with
fatal error: error in backend: Unhandled Souper instruction phi in Codegen::getValue()
Invocation:
souper/third_party/llvm-Release-install/bin/clang++ -c -O2 -Xclang -load -Xclang souper/build/libsouperPass.so -mllvm -souper-external-cache -mllvm -disable-all-peepholes foo.cpp
To reproduce from scratch:
The text was updated successfully, but these errors were encountered: