-
Notifications
You must be signed in to change notification settings - Fork 279
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
Deserializer masks out signaling nans #2027
Comments
Here are the issues that caused this behaviour: BurntSushi/byteorder#71 and rust-lang/rust#39271 |
I am working on submitting a patch to fix the very incorrect piece of llvm documentation that originally motivated this. |
Great. It might also be valuable for us to make sure there are tests in llvm that ensure that behaviour around signalling NaNs is sane. |
Here's the beginnings of some tests that show that signaling NaNs don't turn immediately into undef ; RUN: opt < %s -O2 -S | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.13.0"
; Function Attrs: norecurse nounwind readnone ssp uwtable
define float @f(float, float) {
%3 = fdiv float %0, %1
ret float %3
}
define float @f2(float, float) {
%3 = fdiv float 0x7FF8000000000000, %1
ret float %3
}
define float @f3(float, float) {
%3 = fdiv float 0x7FF4000000000000, %1
ret float %3
}
define float @f4(float, float) {
%3 = fdiv float 5.000000e+00, %1
ret float %3
}
define float @f6(float, float) {
%3 = fdiv float %0, 0x7FF4000000000000
ret float %3
}
define float @f7(float, float) {
%3 = fdiv float 5.0000e+000, 0x7FF4000000000000
ret float %3
}
define float @f8(float, float) {
%3 = fdiv float 0x7FF8000000000000, 0x7FF4000000000000
ret float %3
}
define float @f9(float, float) {
%3 = fdiv float 0x7FF4000000000000, 0x7FF8000000000000
ret float %3
} |
@gankro Is this bug still relevant to be open in the WR repo? |
Nope. We can close this. |
When @gankro and I were looking at the deserialization code we noticed that it's masking out signaling NaNs. We don't need this protection. We don't know how to convince the byteorder crate of this.
The text was updated successfully, but these errors were encountered: