-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
LLVM 3.6 giving incorrectly signed zeros #10377
Comments
Should we have a label for llvm bugs? |
We can probably rename the "fixed in LLVM 3.5" label to be a general "LLVM issue" instead... or just keep using "upstream" where it's usually pretty clear which upstream is being referred to. |
BTW, I haven't filed an upstream issue, as I wasn't really sure where the problem lay. Could someone who understands more about the internals help me out? |
"fixed in LLVM 3.5" is actually a pretty useful label since we'll know exactly which issues to confirm and close when we upgrade LLVM. |
True, but we can re-appropriate it after that's done. Either "fixed in LLVM 3.7" or something else. |
Or just add a new label. |
I don't really understand the internals very well, but I think the way to communicate these things upstream would be to try to create a standalone |
The problem is that the generated LLVM IR is incorrect (see above), so I'm not sure where the actual problem lies. |
|
Isn't it just likely to be an LLVM optimization pass bug? Perhaps try disabling all the optimizations and see if it persists. |
Looking at the debug info, here's the two optimisation passes between which the wrong value gets returned:
|
Bug report opened here: LLVM #22823. |
So it looks like it has been patched in svn (http://reviews.llvm.org/rL230564), but it just missed out on 3.6. Does this mean we need a "fixed in LLVM 3.7" tag? |
Or hopefully "to be fixed in LLVM 3.6.1"? |
Ask in the bug thread / mailing list if the fix can be a candidate for backporting for 3.6.1. edit: looks like you already did, great - see http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/082945.html for the patch release plans. We could try making a local patch for this too. |
LLVM doesn't do point releases. |
Don't they? There are point releases (3.4.1, 3.4.2, and 3.5.1) on the download page. |
Oh, I guess they started doing point releases in the 3.4 cycle. Nevermind, I hadn't noticed that. |
3.6.1 is scheduled for March (this month), so backporting would need to happen soon. |
@eschnett see http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/082945.html, 3.5.2 is scheduled for March, 3.6.1 is scheduled for May. I just tested fixing this as a local patch and it seems to work, I'll open a PR. |
This patch made the 3.6.1 release: |
Awesome, thanks for keeping an eye on that one. |
Using LLVM 3.6, branches involving comparison to zero can sometimes return the incorrect sign.
This has come up in #9336 (comment) and #9880 (comment).
Here is a minimal example:
And the
@code_llvm foo(0.0,-0.0)
:The problem here is that the
if2
label it is returning%0
instead of%1
.The text was updated successfully, but these errors were encountered: