[jdk18] RFR: 8278508: Enable X86 maskAll instruction pattern for 32 bit JVM. [v2]
Jatin Bhateja
jbhateja at openjdk.java.net
Tue Dec 21 16:28:59 UTC 2021
On Sat, 18 Dec 2021 00:16:35 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8278508: Review comments resolution.
>
> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4281:
>
>> 4279: if (mask_len > 32) {
>> 4280: kmovql(dst, src);
>> 4281: kshiftrql(dst, dst, 64 - mask_len);
>
> Here masklen is 64, so kshiftrql is not needed here?
src operand carry either a 0 (false mask) or 0XFFFFFFFFFFFFFFFF (true mask) value. Thus a right shift here ensures that destination bits whose size matches with mask_len are set.
I have introduced special case handling when mask_len is 64, 32 and 16.
> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4299:
>
>> 4297: kshiftlql(dst, tmp, 32);
>> 4298: korql(dst, dst, tmp);
>> 4299: kshiftrql(dst, dst, 64 - mask_len);
>
> Do we need the kshiftrql here? The masklen is 64 here.
> You could alternatively use:
> kmovdl dst, src
> kunpckdq dst, dst, dst
DONE
> src/hotspot/cpu/x86/x86.ad line 9457:
>
>> 9455: predicate(Matcher::vector_length(n) <= 32);
>> 9456: match(Set dst (MaskAll cnt));
>> 9457: effect(TEMP dst, TEMP tmp);
>
> TEMP dst is not needed here.
dst is both read and written to in macro assembly routine.
-------------
PR: https://git.openjdk.java.net/jdk18/pull/24
More information about the hotspot-compiler-dev
mailing list