-
Notifications
You must be signed in to change notification settings - Fork 87
u64x4::clamp producing unexpected and incorrect results #253
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
C-bug
Category: Bug
Comments
that's because |
this is nearly identical to what's happening in #247 we need to add |
Closed
10 tasks
RalfJung
added a commit
to RalfJung/portable-simd
that referenced
this issue
Mar 12, 2022
RalfJung
added a commit
to RalfJung/portable-simd
that referenced
this issue
Mar 12, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It has been observed that, at least on x86 systems, the usage of
std::simd::u64x4::clamp
may cause undefined behaviour under seemingly random conditions, or at least may not function properly.The issue can be reproduced in the Rust Playground (Edit: in both debug and release modes):
I expected this code to produce a result of [9, 1, 1, 1].
The code, in my testing, instead produced a result of [9, 9, 9, 9].
This example should have produced a result of [1, 1, 1, 9].
It instead produced a result of [1, 1, 1, 10].
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: