-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add f16
and f128
const eval for casting operations
#126718
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
Conversation
The job Click to see the possible cause of the failure (guessed by this bot)
|
|
||
// f16 -> u32 | ||
assert_eq::<u32>(f16::MAX as u32, 65504); | ||
assert_eq::<u32>(f16::MIN as u32, 0); |
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.
Does this match rustc tests, or is rustc not ready yet to run all of these?
I can't really check whether your values make sense; so far I always did this by just running the test with rustc and then making sure Miri behavior matches rustc behavior.
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.
rustc should be able to run the f16
/f128
on at least Linux x86 and aarch64, but many other platforms are missing the f16/f128 symbols until compiler builtins gets updated. Not sure if you meant fully testing in CI or just locally.
However, I still don't have the constants needed to fully test casting on the new types. So I moved only the test refactoring to its own PR (#126727), and am just going to close this one until #126608 can land.
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.
Also there are some ABI issues on x86 without SSE2, which might explain the failure at https://github.com/rust-lang/rust/actions/runs/9589520480/job/26443432727?pr=126718#step:25:3379 (haven't looked too much into it)
This is a continuation of #126429 that should add missing operations.