You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scatter and gather are not strict provenance compatible #271
The implementations of gather and scatter in portable-simd currently are not compatible with strict provenance. Specifically, it is SimdConstPtr::wrapping_add that transmutes a vector of pointers to a vector of integers, does integer arithmetic, and then transmutes back the result. It also has safety comments that are somewhat in conflict with what I am writing in rust-lang/rust#95547. ;)
Hmm, I was thinking offsetting pointers is pretty backend-agnostic but I don't see anything similar. It's probably fine putting it in the LLVM backend with all of the other SIMD intrinsics.
Activity
calebzulawski commentedon Apr 3, 2022
I think this is easy to fix, we just need a new intrinsic for vector pointer offset
RalfJung commentedon Apr 10, 2022
So how would one start fixing this? Add a new
simd_offsetcase around here? Can I just callbx.inbounds_gepwith SIMD types?calebzulawski commentedon Apr 10, 2022
Yeah, that seems right to me. It might also be possible to implement it in
rustc_codegen_ssa?RalfJung commentedon Apr 10, 2022
Are there other SIMD intrinsics that do that that could be used as a template?
calebzulawski commentedon Apr 10, 2022
Hmm, I was thinking offsetting pointers is pretty backend-agnostic but I don't see anything similar. It's probably fine putting it in the LLVM backend with all of the other SIMD intrinsics.
Rollup merge of rust-lang#95961 - RalfJung:gather-scatter, r=workingj…
Rollup merge of rust-lang#95961 - RalfJung:gather-scatter, r=workingj…
Rollup merge of rust-lang#95961 - RalfJung:gather-scatter, r=workingj…
Rollup merge of rust-lang#95961 - RalfJung:gather-scatter, r=workingj…
Rollup merge of rust-lang#95961 - RalfJung:gather-scatter, r=workingj…
Rollup merge of #95961 - RalfJung:gather-scatter, r=workingjubilee
Rollup merge of #95961 - RalfJung:gather-scatter, r=workingjubilee
Rollup merge of #95961 - RalfJung:gather-scatter, r=workingjubilee