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 all 16 AVX compare operators for 128-bit SIMD vectors #3176

Merged
merged 2 commits into from Nov 20, 2023

Conversation

eduardosm
Copy link
Contributor

_mm_cmp_{ss,ps,sd,pd} functions are AVX functions that use llvm.x86.sse{,2}. prefixed intrinsics, so they were "accidentally" partially implemented when SSE and SSE2 intrinsics were implemented.

The 16 AVX compare operators are now implemented and tested.

src/shims/x86/mod.rs Outdated Show resolved Hide resolved
// Bit 4 specifies whether the operation is quiet or signaling, which
// we do not care in Miri.
// Bits 0..=2 specifies the operation.
let (gt, lt, eq, unord) = match imm & 0b111 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let (gt, lt, eq, unord) = match imm & 0b111 {
// `gt` indicates the result to be returned when the LHS is strictly greater than the RHS, and so on.
let (gt, lt, eq, unord) = match imm & 0b111 {

`_mm_cmp_{ss,ps,sd,pd}` functions are AVX functions that use `llvm.x86.sse{,2}` prefixed intrinsics, so they were "accidentally" partially implemented when SSE and SSE2 intrinsics were implemented.

The 16 AVX compare operators are now implemented and tested.
@RalfJung
Copy link
Member

Awesome, thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Nov 20, 2023

📌 Commit 477e2fc has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Nov 20, 2023

⌛ Testing commit 477e2fc with merge d251208...

@bors
Copy link
Collaborator

bors commented Nov 20, 2023

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

@bors bors merged commit d251208 into rust-lang:master Nov 20, 2023
8 checks passed
@eduardosm eduardosm deleted the cmp branch November 20, 2023 17:50
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.

None yet

3 participants