Skip to content
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

Fix UB in _mm_movemask_ps, _mm_movemask_pd, _mm256_movemask_ps and _mm256_movemask_pd #1482

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

eduardosm
Copy link
Contributor

The simd_bitmask intrinsic requires each element to be all-1 or all-0, while the x86 functions only check for the highest bit.

@rustbot
Copy link
Collaborator

rustbot commented Oct 11, 2023

r? @Amanieu

(rustbot has picked a reviewer for you, use r? to override)

…m256_movemask_pd

The `simd_bitmask` intrinsic requires each element to be all-1 or all-0, while the x86 functions only check for the highest bit.
@eduardosm
Copy link
Contributor Author

Hmmm

LLVM ERROR: IO failure on output stream: No space left on device
error: could not compile `core_arch` (lib)
Error: Process completed with exit code 101.

@Amanieu
Copy link
Member

Amanieu commented Oct 11, 2023

Can you do a quick test on godbolt to ensure this still compiles down to 1 instruction?

@eduardosm
Copy link
Contributor Author

Of course: https://godbolt.org/z/n6EMz7dbv

@Amanieu Amanieu merged commit f4528dd into rust-lang:master Oct 12, 2023
25 of 26 checks passed
@eduardosm eduardosm deleted the movemask branch October 12, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants