Feature request: shuffle methods
Looks like LLVM autovectorizer struggles with turning array operations into shuffles, so direct control would be very welcome. This would be particularly useful for things like bitonic sorting.
I'd love to have this. I think the shuffle pattern has to be a const value on x86, which might make it awkward, but even so it's a good idea.
If someone does the PR I'll try to review it as quickly as possible.
I think the shuffle pattern has to be a const value on x86
Yeah, IIRC stdlib intrinsics solve this by taking such params (in shuffle and other ops with similar restriction) via const generics.
Same should work here.
What stable intrinsics would this translate to? Sadly most of the < 32 bit shuffle intrinsics are kind of special case
presumably these ones: https://docs.rs/safe_arch/latest/safe_arch/?search=shuffle