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

simd: implement pointer provenance intrinsics #519

Merged
merged 1 commit into from
May 27, 2024

Conversation

sadlerap
Copy link
Contributor

This adds support for the simd variants of the pointer provenance intrinsics, which are simd_cast_ptr, simd_expose_addr, and simd_from_exposed_addr.

The preconditions for each intrinsic are adapted from rustc_codegen_llvm to preserve compatibility. Each of these intrinsics are implemented as calling the non-simd variant of each intrinsic on each lane.

This is enough to enable the UI test ui/simd/intrinsic/ptr-cast.rs to pass.

This adds support for the simd variants of the pointer provenance
intrinsics, which are `simd_cast_ptr`, `simd_expose_addr`, and
`simd_from_exposed_addr`.

The preconditions for each intrinsic are adapted from rustc_codegen_llvm
to preserve compatibility.  Each of these intrinsics are implemented as
calling the non-simd variant of each intrinsic on each lane.

This is enough to enable the UI test `ui/simd/intrinsic/ptr-cast.rs` to
pass.

Signed-off-by: Andy Sadler <[email protected]>
@GuillaumeGomez
Copy link
Member

Thanks! Let's wait for @antoyo to take a look as well. :)

@antoyo antoyo merged commit 02eb434 into rust-lang:master May 27, 2024
34 checks passed
@antoyo
Copy link
Contributor

antoyo commented May 27, 2024

Thank you for your contribution!

@sadlerap sadlerap deleted the simd-ptr-provenance branch May 27, 2024 17:44
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