RFR: 8325083: jdk/incubator/vector/Double512VectorTests.java crashes in Assembler::vex_prefix_and_encode [v3]

Jatin Bhateja jbhateja at openjdk.org
Tue May 28 17:09:18 UTC 2024


On Tue, 28 May 2024 05:24:58 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> @jatin-bhateja can you explain in more details what KNL is missing to trigger the assert? Can we predicate on missing feature here instead of KNL && DBL checks?
>> My concern is KNL check could be not enough if such feature is disabled in some container environment which does not match KNL settings.
>> 
>> Why we have `assert(UseAVX > 0` here? `Assembler::vpmov*()` instructions have corresponding asserts already. No need to fix it here but I think we need to cleanup `*.ad` files from such duplicated asserts as separate RFE.
>
>> @jatin-bhateja can you explain in more details what KNL is missing to trigger the assert? Can we predicate on missing feature here instead of KNL && DBL checks? My concern is KNL check could be not enough if such feature is disabled in some container environment which does not match KNL settings.
>> 
>> Why we have `assert(UseAVX > 0` here? `Assembler::vpmov*()` instructions have corresponding asserts already. No need to fix it here but I think we need to cleanup `*.ad` files from such duplicated asserts as separate RFE.
> 
> Hi @vnkozlov ,  Problem occurs while emitting VMOVSXBD instruction, please refer to following LOC
> https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp#L2936
> 
> This is a case for byte to double conversion and we break it into two instructions, first for byte to doubleword casting followed by doubleword to double precision casting, while we could have used a combination of VMOVSXBQ + VCVTQQ2PD but it would further sharpen target constrains since quadword to double precision casting needs AVX512DQ feature, thus current scheme works well and by limiting operand allocations to legacy register set we can safely issue 256 bit VMOVSXBD instruction on KNL target which lacks AVX512VL feature.

> @jatin-bhateja Thank you for explaining the issue. I am fine with splitting instruction to use legacy registers. My only concern is use of `!VM_Version::is_knights_family()` check. Can we use `VM_Version::supports_avx512vl()` instead?

DONE

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

PR Comment: https://git.openjdk.org/jdk/pull/19407#issuecomment-2135736176


More information about the hotspot-compiler-dev mailing list