-
Notifications
You must be signed in to change notification settings - Fork 82
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
scatter
and gather
are not strict provenance compatible
#271
Comments
I think this is easy to fix, we just need a new intrinsic for vector pointer offset |
So how would one start fixing this? Add a new |
Yeah, that seems right to me. It might also be possible to implement it in |
Are there other SIMD intrinsics that do that that could be used as a template? |
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. |
…ubilee implement SIMD gather/scatter via vector getelementptr Fixes rust-lang/portable-simd#271 However, I don't *really* know what I am doing here... Cc `@workingjubilee` `@calebzulawski` I didn't do anything for cranelift -- `@bjorn3` not sure if it's okay for that backend to temporarily break. I'm happy to cherry-pick a patch that adds cranelift support. :)
…ubilee implement SIMD gather/scatter via vector getelementptr Fixes rust-lang/portable-simd#271 However, I don't *really* know what I am doing here... Cc ``@workingjubilee`` ``@calebzulawski`` I didn't do anything for cranelift -- ``@bjorn3`` not sure if it's okay for that backend to temporarily break. I'm happy to cherry-pick a patch that adds cranelift support. :)
…ubilee implement SIMD gather/scatter via vector getelementptr Fixes rust-lang/portable-simd#271 However, I don't *really* know what I am doing here... Cc ```@workingjubilee``` ```@calebzulawski``` I didn't do anything for cranelift -- ```@bjorn3``` not sure if it's okay for that backend to temporarily break. I'm happy to cherry-pick a patch that adds cranelift support. :)
…ubilee implement SIMD gather/scatter via vector getelementptr Fixes rust-lang/portable-simd#271 However, I don't *really* know what I am doing here... Cc `@workingjubilee` `@calebzulawski` I didn't do anything for cranelift -- `@bjorn3` not sure if it's okay for that backend to temporarily break. I'm happy to cherry-pick a patch that adds cranelift support. :)
implement SIMD gather/scatter via vector getelementptr Fixes rust-lang/portable-simd#271 However, I don't *really* know what I am doing here... Cc ``@workingjubilee`` ``@calebzulawski`` I didn't do anything for cranelift -- ``@bjorn3`` not sure if it's okay for that backend to temporarily break. I'm happy to cherry-pick a patch that adds cranelift support. :)
The implementations of
gather
andscatter
in portable-simd currently are not compatible with strict provenance. Specifically, it isSimdConstPtr::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. ;)The text was updated successfully, but these errors were encountered: