Skip to content

Implement some llvm.x86.sse2.* intrinsics and add tests #3055

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

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Implement some llvm.x86.sse2.* intrinsics and add tests #3055

merged 3 commits into from
Sep 12, 2023

Conversation

eduardosm
Copy link
Contributor

Continuation of #2989 with SSE2 intrinsics.

Thankfully, a significant amount of SSE2 functions use simd_* intrinsics, which are already implemented in Miri.

@RalfJung
Copy link
Member

@rustbot author

@rustbot rustbot added the S-waiting-on-author Status: Waiting for the PR author to address review comments label Sep 11, 2023
@eduardosm
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Sep 11, 2023
@RalfJung
Copy link
Member

All right, looking great overall! Please squash into <4 commits, then we can land this. :)

Implements LLVM intrisics needed to run most SSE2 functions from `core::arch::x86{,_64}`.

Also adds miri tests for those functions (mostly copied from core_arch tests).
@eduardosm
Copy link
Contributor Author

Ready!

@eduardosm
Copy link
Contributor Author

Remainder to myself:

  • Implement bin_op_f32/bin_op_f64 with generics to reduce code duplication.
  • Figure out a widening conversion helper function to implement avg and mulh without host integer arithmetic.

I will work on that once this lands in the main Rust repo because I expect to add helpers to rustc_middle.

@RalfJung
Copy link
Member

Thanks. :)
@bors r+

I will work on that once this lands in the main Rust repo because I expect to add helpers to rustc_middle.

I expect it will be rustc_const_eval, but it will be on the rustc side either way.

@bors
Copy link
Contributor

bors commented Sep 12, 2023

📌 Commit 0567761 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 12, 2023

⌛ Testing commit 0567761 with merge 0143f1f...

@bors
Copy link
Contributor

bors commented Sep 12, 2023

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

@bors bors merged commit 0143f1f into rust-lang:master Sep 12, 2023
@RalfJung
Copy link
Member

@eduardosm his is synced into rustc now.

@saethlin saethlin removed the S-waiting-on-review Status: Waiting for a review to complete label Sep 22, 2023
@eduardosm eduardosm deleted the x86-sse2-intrinsics branch September 24, 2023 12:14
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.

5 participants