RFR: 8287835: Add support for additional float/double to integral conversion for x86 [v2]

Sandhya Viswanathan sviswanathan at openjdk.java.net
Mon Jun 6 21:24:52 UTC 2022


On Mon, 6 Jun 2022 18:54:33 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> src/hotspot/cpu/x86/x86.ad line 7298:
>> 
>>> 7296:   predicate(((VM_Version::supports_avx512vl() ||
>>> 7297:               Matcher::vector_length_in_bytes(n) == 64)) &&
>>> 7298:              is_integral_type(Matcher::vector_element_basic_type(n)));
>> 
>> Do we need some of these conditions since you have them already in `match_rule_supported_vector()`?
>
> The predicate is not correct for all types this instruction is used now: it says that if size is 64 bytes you don't need avx512vl support for all types. Is it true?
> 
> All this is very confusing. I suggest to keep original `castFtoI_reg_evex()` instruction as it was and use new `castFtoX_reg_evex()` only for T_LONG and sub_integer with new predicate `(type != T_INT)` and additional conditions if needed.

Yes it was needed to select between the rules. On platforms that don't support avx512vl, we use AVX512 instructions only for 512-bit vectors and AVX instructions for < 64 byte vectors.

-------------

PR: https://git.openjdk.java.net/jdk/pull/9032


More information about the hotspot-compiler-dev mailing list