rust-lang / rustc_codegen_gcc

libgccjit AOT codegen for rustc
Apache License 2.0
893 stars 61 forks source link

simd: implement pointer provenance intrinsics #519

Closed sadlerap closed 1 month ago

sadlerap commented 1 month ago

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.

GuillaumeGomez commented 1 month ago

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

antoyo commented 1 month ago

Thank you for your contribution!