RFR: 8348868: AArch64: Add backend support for SelectFromTwoVector

Xiaohong Gong xgong at openjdk.org
Thu Feb 27 02:06:52 UTC 2025


On Mon, 24 Feb 2025 09:20:59 GMT, Bhavana Kilambi <bkilambi at openjdk.org> wrote:

>> Yes, `bsl` only accepts 8B/16B, but it can also work for other types. We need to keep all bits of the lane to 1/0 (e.g. `[0xffffffffffffffff, 0x0000000000000000]` for `T2D` type). You can take the implementation of `VectorBlend` as a reference.
>> 
>> BTW, I'm currently working on adding the vector rearrange support for 2D (i.e. 128-bit long/double vector) types, and I met the same issues. I have tested that using a pattern with `bsl` can implement the op. The main idea is 1) compare the shuffle input with an iota index vector, and 2) choose `src` input or `swap two elements in src` based on the comparing result with `bsl`. Hope this could help you!
>
> Thank you for your inputs. I'll look into this.

Hi @Bhavana-Kilambi , I'v created a new PR https://github.com/openjdk/jdk/pull/23790 to implement the `VectorRearrange` for small lane count vector types like `2D`. I think the implementation is quite same with what we discussed here.  Any feedback please let me know. Thanks!

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23570#discussion_r1972691040


More information about the hotspot-compiler-dev mailing list