RFR: 8292898: [vectorapi] Unify vector mask cast operation [v2]
Jatin Bhateja
jbhateja at openjdk.org
Fri Sep 23 08:13:13 UTC 2022
On Fri, 23 Sep 2022 07:34:43 GMT, Quan Anh Mai <duke at openjdk.org> wrote:
>> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4630:
>>
>>> 4628: } else {
>>> 4629: vpmovsxbw(dst, src, vlen_enc);
>>> 4630: }
>>
>> if int/short == 2 and target == AVX512BW: VPMOVSXBW looks incorrect, expectation is to wide cast each 16 bit lane to 32 bit and not 8 bit to 16 bit.
>
> A mask element of type short can only be 0x0000 or 0xFFFF, in those cases both `vpmovsxbw` and `vpmovsxwd` transform it to 0x00000000 and 0xFFFFFFFF, respectively. The same logic applies to the below circumstances.
Correct, its signed extension, not zero extension.
-------------
PR: https://git.openjdk.org/jdk/pull/10192
More information about the hotspot-compiler-dev
mailing list