RFR: 8354471: Assertion failure with -XX:-EnableX86ECoreOpts

Volodymyr Paprotski vpaprotski at openjdk.org
Tue Apr 15 15:17:45 UTC 2025


On Tue, 15 Apr 2025 11:37:43 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> The check to choose between AVX2 and AVX512 implementation was relying on `EnableX86ECoreOpts`. It should be relying on `supports_avxifma` and mirror the `UseIntPolyIntrinsics` check in `vm_version_x86.cpp`.
>> 
>> Note, in `stubGenerator_x86_64.cpp`, entry to the patched function is protected already:
>> 
>>   if (UseIntPolyIntrinsics) {
>>     StubRoutines::_intpoly_montgomeryMult_P256 = generate_intpoly_montgomeryMult_P256();
>>     StubRoutines::_intpoly_assign = generate_intpoly_assign();
>>   }
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 567:
> 
>> 565:   __ enter();
>> 566: 
>> 567:   if (VM_Version::supports_avxifma()) {
> 
> As per the latest architecture-instruction-set-extensions-programming-reference document, the upcoming Diamond Rapdis CPU has AVX-IFMA but its also a P-Core Xeon with 512 bit flavour of IFMA, do you think it is performant to generate montgomeryMultiplyAVX2 for it ?
> 
> ![image](https://github.com/user-attachments/assets/f1247484-180d-4a65-9b79-745a388c0552)

Thanks for spotting this! I was wondering about this if statement being 'future-proof'.. I think its best to just flip the order of the if to prefer the AVX512 when available (it will make the diff look bigger, which is why I originally avoided it..)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24644#discussion_r2044881182


More information about the hotspot-compiler-dev mailing list