-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Deduplicated float tests and unified in floats/mod.rs #148206
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
Open
xonx4l
wants to merge
1
commit into
rust-lang:main
Choose a base branch
from
xonx4l:deduplicate-float-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+689
−1,345
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
133 changes: 133 additions & 0 deletions
133
compiler/rustc_codegen_cranelift/patches/0029-sysroot_tests-disable-f16-math.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| From d8dd5ea96866cba6c88ccc489eed3471c259a507 Mon Sep 17 00:00:00 2001 | ||
| From: xonx <119700621+xonx4l@users.noreply.github.com> | ||
| Date: Sat, 24 Jan 2026 06:52:57 +0000 | ||
| Subject: [PATCH] Disable f16 math tests for cranelift | ||
|
|
||
| --- | ||
| coretests/tests/floats/mod.rs | 26 +++++++++++++------------- | ||
| 1 file changed, 13 insertions(+), 13 deletions(-) | ||
|
|
||
| diff --git a/coretests/tests/floats/mod.rs b/coretests/tests/floats/mod.rs | ||
| index b00d9903019..e81769db184 100644 | ||
| --- a/coretests/tests/floats/mod.rs | ||
| +++ b/coretests/tests/floats/mod.rs | ||
| @@ -1534,7 +1534,7 @@ fn s_nan() -> Float { | ||
| name: powf, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1557,7 +1557,7 @@ fn s_nan() -> Float { | ||
| name: exp, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1578,7 +1578,7 @@ fn s_nan() -> Float { | ||
| name: exp2, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1598,7 +1598,7 @@ fn s_nan() -> Float { | ||
| name: ln, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1620,7 +1620,7 @@ fn s_nan() -> Float { | ||
| name: log, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1645,7 +1645,7 @@ fn s_nan() -> Float { | ||
| name: log2, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1668,7 +1668,7 @@ fn s_nan() -> Float { | ||
| name: log10, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1692,7 +1692,7 @@ fn s_nan() -> Float { | ||
| name: asinh, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1723,7 +1723,7 @@ fn s_nan() -> Float { | ||
| name: acosh, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1750,7 +1750,7 @@ fn s_nan() -> Float { | ||
| name: atanh, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1776,7 +1776,7 @@ fn s_nan() -> Float { | ||
| name: gamma, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -1802,7 +1802,7 @@ fn s_nan() -> Float { | ||
| name: ln_gamma, | ||
| attrs: { | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| @@ -2015,7 +2015,7 @@ fn s_nan() -> Float { | ||
| attrs: { | ||
| // FIXME(f16_f128): add math tests when available | ||
| const: #[cfg(false)], | ||
| - f16: #[cfg(any(not(miri), target_has_reliable_f16_math))], | ||
| + f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622) | ||
| f128: #[cfg(all(not(miri), target_has_reliable_f128_math))], | ||
| }, | ||
| test<Float> { | ||
| -- | ||
| 2.50.1 | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this patch file needs to be regenerated against the new changes
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Was doing that but got some work so couldn't send the push but will send one asap .