-
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
Different NaN types on mipsel and mips64el than on most other architectures #68925
Comments
Note that this is a valid bug because it violates what that the docs of the
See also my comments in that thread for some investigations. |
Both tests pass on actual mips64el hardware (Cavium Octeon II V0.1), as tested with EDIT: both with and without optimisations. |
I didn't get cargo-bisect-rustc running properly, as it seems to be targeted at compile-time errors, and with the other attepmts (adding |
Hmmm indeed c5295ac looks very much related. These are the changes in the compiler-builtins repo: rust-lang/compiler-builtins@0.1.15...0.1.16 . These are the changes in libm: rust-lang/libm@0ae4428...01bee72 . This is the PR that added Rust float min/max functions: #42430. I can't find anything suspicious, in fact it should just have moved the code from one place to another. The next thing to investigate would probably be the codegen changes. This is the 1.36 output while this is the 1.37 output (both with optimizations enabled). IDK how one can get godbolt to show the fmaxf implementation. @silwol do you get the bug in release mode or only in debug mode? |
@est31 Hadn't thought about checking whether it has something to do with build mode. Just tested, it only fails in debug build mode, and succeeds in release build mode. |
Thanks that's consistent with the output of godbolt I linked above, as there the compiler just optimizes out the checks. |
The following tests fail on mipsel and mips64el architectures while succeeding most others.
It succeeded on mipsel up to stable 1.36.0 rustc, and started failing in 1.37.0 and newer. I'll attempt to use cargo-bisect-rustc track down the exact nightly version that introduced the change (might take some time because it's a qemu vm that is rather slow).
#52897 (comment) was where the initial discussion started, but it seems to be worth a separate issue instead of creating noise there.
It looks as if the failing platforms have a signaling NAN (sNAN) in opposite to the succeeding ones with a quiet NAN (qNAN).
The text was updated successfully, but these errors were encountered: