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

implement simd_eq and simd_reduce_any #1978

Merged
merged 2 commits into from
Feb 22, 2022
Merged

Conversation

RalfJung
Copy link
Member

This lets us re-enable the division and modulo tests, since those operations now internally use simd_eq and simd_reduce_any.

However, I am not sure what exactly the rules are for simd_reduce_any. @workingjubilee for now I made it UB to call those with inputs that are not all-0 or all-1, but that might be taking it too far?

@workingjubilee
Copy link
Member

I think that's correct, actually. It wants to be allowed to use a vectorwise signed integer minimum when lowering to the machine code.

@RalfJung
Copy link
Member Author

Oh, I see.

I hope portable-simd makes sure that no other bit patterns ever reach those intrinsics, then. ;)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 21, 2022
CTFE engine: Scalar: expose size-generic to_(u)int methods

This matches the size-generic constructors `Scalar::from_(u)int`, and it would have helped in rust-lang/miri#1978.

r? `@oli-obk`
@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 22, 2022

📌 Commit 1ac1e55 has been approved by RalfJung

@bors
Copy link
Collaborator

bors commented Feb 22, 2022

⌛ Testing commit 1ac1e55 with merge d03b4a0...

@bors
Copy link
Collaborator

bors commented Feb 22, 2022

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing d03b4a0 to master...

@bors bors merged commit d03b4a0 into rust-lang:master Feb 22, 2022
@workingjubilee
Copy link
Member

We do, effectively, because we only combine that intrinsic with the Mask types, but fortunately we also now have a way to find out if we don't. ^^;

@RalfJung RalfJung deleted the simd_eq branch February 24, 2022 15:32
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