Add 64-bit integer vectors and operations on them#253
Conversation
|
The documentation for load/store_interleaved_128 was misleading. Both formulations are valid for 32-bit elements but the 8- and 16-bit elements already behaved differently, following the NEON vld4/vst4 semantics rather than our documented semantics. This misled me into generalizing the op to 64-bit numbers incorrectly. I've changed the implementation back to vld4/vst4 semantics in subsequent commits and updated documentation. |
Add i64/u64 vector types and operations across the generated SIMD backends, with focused int64 coverage and optimized interleaved load/store paths where available.
|
I'm curious, do you think this will overall impact the compile time for the crate a lot, even if none of the 64-bit stuff is used? Have you done any measurements? |
|
It really shouldn't. This is all generic code, so it is not actually instantiated and doesn't turn into MIR or LLVM IR until something actually calls it. The downside of generics is that if we call the same function 5 times you get 5 different instantiations of it so 5x the IR for LLVM to chew through, but in our case we want all the intrinsics inlined anyway so this is unavoidable, generics or not. |
|
Marking this as draft until it's updated to latest main. Some refactoring should also be possible now that the SSE2 PR has laid the groundwork for nicer scalar fallback. |
…Lake is available
…ll scalar fallbacks use it, remove the code that duplicates it that originated in the i64 branch
| if vec_ty.scalar_bits == 64 | ||
| && matches!(vec_ty.scalar, ScalarType::Int | ScalarType::Unsigned) | ||
| && method != "simd_eq" | ||
| { | ||
| return fallback_method(op, vec_ty); | ||
| } | ||
|
|
There was a problem hiding this comment.
I don't like that this fires only when it's not AVX-512 but this is not explicitly under an else or a non-AVX-512 branch. I want to refactor all the early returns out of the generator, but that's best left to a follow-up PR, I don't want to cram even more unrelated changes into this one.
|
This should now be ready for review. |
There are two unrelated changes:
array::from_fn()callsSupersedes #97