RFR: 8348868: AArch64: Add backend support for SelectFromTwoVector
Xiaohong Gong
xgong at openjdk.org
Mon Feb 24 07:42:57 UTC 2025
On Thu, 20 Feb 2025 08:49:16 GMT, Bhavana Kilambi <bkilambi at openjdk.org> wrote:
>> @Bhavana-Kilambi , left shift can not get right indexes here as values `0x2, 0x4` is landed in each B lane. Maybe we can just try with `bsl` for D size types, as it has only two lanes for long/double types with 128-bit vector length.
>
> Hi @XiaohongGong , thanks but bsl instruction only has 8B/16B types. not D type. I'll see how I can do this with bsl.
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!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23570#discussion_r1967146405
More information about the hotspot-compiler-dev
mailing list