RFR: 8294186: AArch64: VectorMaskToLong failed on SVE2 machine with -XX:UseSVE=1
Andrew Haley
aph at openjdk.org
Tue Sep 27 10:07:23 UTC 2022
On Tue, 27 Sep 2022 09:48:24 GMT, Eric Liu <eliu at openjdk.org> wrote:
> C2_MacroAssembler::sve_vmask_tolong would fail on BITPERM supported SVE2 machine with "-XX:UseSVE=1".
>
> `BITPERM` is an optional feature in SVE2. With this feature, VectorMaskToLong has a more efficent implementation. For other cases, it should generate SVE1 code.
>
> [TEST]
> jdk/incubator/vector, hotspot/compiler/vectorapi passed on BITPERM supported SVE2 machine, with option -XX:UseSVE=(0, 1, 2).
src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 1001:
> 999: // Given by the vector with value 0x00 or 0x01 in each byte, the basic idea
> 1000: // is to compress each significant bit of the byte in a cross-lane way. Due
> 1001: // to the lack of cross-lane bit-compress instruction, here we use BEXT
Suggestion:
// Given a vector with the value 0x00 or 0x01 in each byte, the basic idea
// is to compress each significant bit of the byte in a cross-lane way. Due
// to the lack of a cross-lane bit-compress instruction, we use BEXT
// (bit-compress in each lane) with the biggest lane size (T = D) then
// concatenate the results.```
-------------
PR: https://git.openjdk.org/jdk/pull/10443
More information about the hotspot-compiler-dev
mailing list