On Fri, 13 Sep 2024 17:20:40 GMT, Quan Anh Mai <qa...@openjdk.org> wrote:
> Given `rearrange` with 1 vector gets wrapping indices semantics. I think we > should stop normalizing indices when converting a `Vector` into a > `VectorShuffle` (currently we wrap all out-of-bound elements to `[-VLEN, > 0)`). Then the rearrange with 2 vectors will also wrap similarly (all indices > are `& (VLEN * 2 - 1)`, then indices `[0, VLEN)` maps to the first vector and > indices `[VLEN, 2 * VLEN)` map to the second vector). We will normalize the > indices when we invoke `VectorShuffle::toVector` which I think is much less > used than `Vector::toShuffle`. What do you think? The guidance from Paul Sandoz and John Rose is to keep the the partial wrapping at shuffle construction as is for now and only change the rearrange and selectFrom apis. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20634#issuecomment-2349763832