[14] RFR (XS): 8234392: C2: Extend Matcher::match_rule_supported_vector() with element type information
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Tue Dec 10 17:00:32 UTC 2019
Thanks for the reviews, Vladimir and John.
> The rules for NegV[DF] and CMoveV[DF] that remain looks
> puzzling to me, and would benefit from a brief comment for
> future readers, explaining why they are there.
>
> The NegV rules seem to be removable for the same reason
> (size limits) that the other rules are removable. If there’s a
The checks are there to ensure AVX512DQ is present and vlen check limits
it to 512-bit vectors:
case Op_NegVF:
if ((vlen == 16) && (VM_Version::supports_avx512dq() == false))
ret_value = false;
break;
case Op_NegVD:
if ((vlen == 8) && (VM_Version::supports_avx512dq() == false))
ret_value = false;
break;
Similar checks for byte operations are redundant, because
Matcher::vector_width_in_bytes() explicitly checks for AVX512BW:
if (UseAVX > 2 && (bt == T_BYTE || bt == T_SHORT || bt == T_CHAR))
size = (VM_Version::supports_avx512bw()) ? 64 : 32;
I can add a comment that AVX512DQ is required, but it doesn't look like
an improvement since the checks say exactly the same.
> tricky reason they must be called out explicitly, it would be
> good to explain. The CMoveV rules probably stem from limited
> support for CMove, but again a comment would be good.
Yes, there are only vcmov8F_reg and vcmov4D_reg present, so the checks
are there to avoid matching failures. I'll put a comment that it's an
implementation limitation.
Best regards,
Vladimir Ivanov
> On Dec 5, 2019, at 1:53 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>>
>> http://cr.openjdk.java.net/~vlivanov/8234392/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8234392
>>
>> Make basic type available in Matcher::match_rule_supported_vector() and refactor Matcher::match_rule_supported_vector() on x86.
>>
>> It enables significant simplification of Matcher::match_rule_supported_vector()on x86 by using Matcher::vector_size_supported() to cover cases like AXV2 is required for 256-bit operaions on integral (see Matcher::vector_width_in_bytes() [1] for details).
>>
>> Contributed-by: Jatin Bhateja <jatin.bhateja at intel.com>
>> Reviewed-by: vlivanov, sviswanathan, ?
>>
>> Testing: tier1-4
>>
>> Best regards,
>> Vladimir Ivanov
>>
>> [1] http://hg.openjdk.java.net/jdk/jdk/file/tip/src/hotspot/cpu/x86/x86.ad#l1442
>
More information about the hotspot-compiler-dev
mailing list