-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Incorrect values from float::signum() when using JIT #7106
Comments
Oh turns out I didn't fix it with that commit. So here's some more investigation (assuming your file is called With no optimizations, the JIT code runs just fine
With run with optimizations, the code doesn't pass
With run with some optimizations, the code doesn't pass differently
@Aatch, you recently did some work with LLVM passes, right? Do you know if these passes could combine to create different code? Also, I'm not sure if LLVM has a pass to dump the module, but it'd be awesome to be able to dump the LLVM bytecode between each pass (by the way, it's awesome just specifying the passes on the command line!). If we keep the optimizations, we're probably generating code that LLVM isn't expecting, so it's optimizing it away from what we want. Why it's only doing this in the JIT though is a bit baffling... |
Oh, found the |
OK, I don't think this is a problem with optimizations at all:
Basically on that code if you run any pass, it returns the wrong result. Now running with Again though, this only shows up when using the JIT. |
And with yet another round of lots and lots of compiling, I conclude this is blocked on #7115 |
@alexcrichton The JIT backend (especially for |
You're probably right about that. I definitely think that it shouldn't be always running certain optimizations by default. Once the dust starts to settle I think that the thing to do would be to hardcode some optimizations into Edit: or maybe even |
On today's build I don't seem to be able to reproduce this. |
@jedestep, what's your platform/architecture? I just built master on OSX/64-bit and it still has the same problem. |
@alexcrichton I'm on the same platform. The program you pasted will still cause a problem when run with --passes print-module, but the more basic problem seems to have been fixed. Calling signum() in rusti, for example, no longer always prints 1. |
That's weird because I routinely get
|
#7115 has landed, this should be fixed now. |
Confirmed fixed |
`single_component_path_imports`: ignore `pub(crate) use some_macro;` Fixes rust-lang#7106 *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: Ignore exporting a macro within a crate using `pub(crate) use some_macro;` for [`single_component_path_imports`]
This initially showed up in rusti, but compilation with JIT causes issues as well. Given the following program
This does not occur when compiling with LLVM. My OS is OSX 10.8 and my architecture is x86-64.
The text was updated successfully, but these errors were encountered: