-
Notifications
You must be signed in to change notification settings - Fork 83
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
gather with i32 indexes #329
Comments
This is related to #323. I wonder--for forward compatibility with new instruction sets that could have some other arbitrary gather index, should gather accept any |
SimpleV gathers with unsigned offsets are more efficient than signed offsets, because the gather operation can be fused with a few minor operations done on the output, such as saturation, but the fusing can only happen when the offsets are unsigned. If no fusing occurs, signed/unsigned is equally efficient (at least in terms of instruction count, some hardware may be faster for one or the other). see the discussion of the SEA bit for load/store indexed in https://libre-soc.org/openpower/sv/ldst/ |
RISC-V V v1.0 doesn't support signed offsets (except by separately converting the offsets to a
(XLEN is basically the number of bits in |
so, imho, if we support any non- |
It should be noted that it is fairly doubtful to offset a base pointer by a negative value in terms of Rust's system of reasoning about pointers, regardless of whether the ISA allows it, because going from |
well, sometimes you want negative offsets on a raw pointer, I agree that it is very rare, but imho it's still worth supporting in some fashion (could be by saying do-it-yourself by using |
otoh, if the semantics of indexing-gather on slices is to |
My remarks were not about what is permissible, as I am aware of that caveat and obviously |
|
As far as I can tell, LLVM's I'll implement this after #322 lands, since that touches |
that's not true,
if you mean targets that don't support gather at all, it would be equivalent to a sequence of scalar |
As far as I can see we can only use gather with
usize
indexes.The x86 intrinsic
_mm256_i32gather_ps
however takesi32
indexes and afloat*
base pointer.Is it possible to add more flexible options to the index type of the gather instructions?
The text was updated successfully, but these errors were encountered: