-
Notifications
You must be signed in to change notification settings - Fork 13.4k
The test f16::test_total_cmp fails in debug mode #141503
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
Labels
A-floating-point
Area: Floating point numbers and arithmetic
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-bug
Category: This is a bug.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Comments
cc @tgross35 |
tgross35
added a commit
to tgross35/rust
that referenced
this issue
May 28, 2025
There is an LLVM bug with lowering of basic `f16` operations that mean a round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple `abs` calls or bitcasts [1]. This is problematic because the round trip quiets signaling NaNs. For most operations this is acceptable, but it is causing `total_cmp` tests to fail unless optimizations are enabled. Disable `total_cmp` tests involving signaling NaNs until this issue is resolved. Fixes: llvm/llvm-project#104915 Fixes: rust-lang#141503 [1]: llvm/llvm-project#104915
Thanks, this was recently discovered at rust-lang/rustc_codegen_cranelift#1578 too. I opened #141676 with a workaround. |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
May 29, 2025
…workingjubilee float: Disable `total_cmp` sNaN tests for `f16` There is an LLVM bug with lowering of basic `f16` operations that mean a round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple `abs` calls or bitcasts [1]. This is problematic because the round trip quiets signaling NaNs. For most operations this is acceptable, but it is causing `total_cmp` tests to fail unless optimizations are enabled. Disable `total_cmp` tests involving signaling NaNs until this issue is resolved. Fixes: rust-lang/rustc_codegen_cranelift#1578 Fixes: rust-lang#141503 [1]: llvm/llvm-project#104915
rust-timer
added a commit
that referenced
this issue
May 30, 2025
Rollup merge of #141676 - tgross35:f16-disable-total-cmp, r=workingjubilee float: Disable `total_cmp` sNaN tests for `f16` There is an LLVM bug with lowering of basic `f16` operations that mean a round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple `abs` calls or bitcasts [1]. This is problematic because the round trip quiets signaling NaNs. For most operations this is acceptable, but it is causing `total_cmp` tests to fail unless optimizations are enabled. Disable `total_cmp` tests involving signaling NaNs until this issue is resolved. Fixes: rust-lang/rustc_codegen_cranelift#1578 Fixes: #141503 [1]: llvm/llvm-project#104915
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this issue
Jun 3, 2025
There is an LLVM bug with lowering of basic `f16` operations that mean a round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple `abs` calls or bitcasts [1]. This is problematic because the round trip quiets signaling NaNs. For most operations this is acceptable, but it is causing `total_cmp` tests to fail unless optimizations are enabled. Disable `total_cmp` tests involving signaling NaNs until this issue is resolved. Fixes: rust-lang/rustc_codegen_cranelift#1578 Fixes: rust-lang#141503 [1]: llvm/llvm-project#104915
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this issue
Jun 3, 2025
…workingjubilee float: Disable `total_cmp` sNaN tests for `f16` There is an LLVM bug with lowering of basic `f16` operations that mean a round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple `abs` calls or bitcasts [1]. This is problematic because the round trip quiets signaling NaNs. For most operations this is acceptable, but it is causing `total_cmp` tests to fail unless optimizations are enabled. Disable `total_cmp` tests involving signaling NaNs until this issue is resolved. Fixes: rust-lang/rustc_codegen_cranelift#1578 Fixes: rust-lang#141503 [1]: llvm/llvm-project#104915
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-floating-point
Area: Floating point numbers and arithmetic
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-bug
Category: This is a bug.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Hi.
I noticed that the core test
f16::test_total_cmp
fails when ran in debug mode.And it passes in release mode.
Here's a small reproducer:
I tried this code:
I expected to see this happen: this test should pass
Instead, this happened: the test fails with:
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: