RFR (XXS) 8234610: MaxVectorSize set wrongly when UseAVX=3 is specified after JDK-8221092
Viswanathan, Sandhya
sandhya.viswanathan at intel.com
Sat Nov 23 01:18:00 UTC 2019
Thank a lot, Vladimir.
Best Regards,
Sandhya
-----Original Message-----
From: hotspot-compiler-dev <hotspot-compiler-dev-bounces at openjdk.java.net> On Behalf Of Vladimir Kozlov
Sent: Friday, November 22, 2019 4:46 PM
To: hotspot-compiler-dev at openjdk.java.net
Subject: Re: RFR (XXS) 8234610: MaxVectorSize set wrongly when UseAVX=3 is specified after JDK-8221092
Looks good.
Thanks,
Vladimir
On 11/22/19 4:35 PM, Viswanathan, Sandhya wrote:
> Please find the updated webrev at: http://cr.openjdk.java.net/~sviswanathan/8234610/webrev.01/
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8234610
>
> Best Regards,
> Sandhya
>
> -----Original Message-----
> From: hotspot-compiler-dev <hotspot-compiler-dev-bounces at openjdk.java.net> On Behalf Of Viswanathan, Sandhya
> Sent: Friday, November 22, 2019 3:59 PM
> To: Vladimir Kozlov <vladimir.kozlov at oracle.com>; hotspot-compiler-dev at openjdk.java.net
> Subject: RE: RFR (XXS) 8234610: MaxVectorSize set wrongly when UseAVX=3 is specified after JDK-8221092
>
> Hi Vladimir,
>
> I agree the following code could be moved under use_evex:
> + if (FLAG_IS_DEFAULT(UseAVX)) {
> + __ lea(rsi, Address(rbp, in_bytes(VM_Version::std_cpuid1_offset())));
> + __ movl(rax, Address(rsi, 0));
> + __ cmpl(rax, 0x50654); // If it is Skylake
> + __ jcc(Assembler::equal, legacy_setup);
> + }
>
> I will send the updated patch.
>
> I explained in the other email how we are getting MaxVectorSize as 16 when user specifies UseAVX=3 on Skylake.
>
> Best Regards,
> Sandhya
>
> -----Original Message-----
> From: hotspot-compiler-dev <hotspot-compiler-dev-bounces at openjdk.java.net> On Behalf Of Vladimir Kozlov
> Sent: Thursday, November 21, 2019 6:03 PM
> To: hotspot-compiler-dev at openjdk.java.net
> Subject: Re: RFR (XXS) 8234610: MaxVectorSize set wrongly when UseAVX=3 is specified after JDK-8221092
>
> Hi Sandhya,
>
> I think you should put cpuid code added by 8221092 under if (use_evex) checks because if user specified UseAVX=2 the code under (use_evex) will not be executed anyway. Or I am missing something.
>
> I did not get why you said MaxVectorSize is being wrongly set to 16 bytes. It should 32 because it will set UseAVX=1 in current code.
>
> Thanks,
> Vladimir
>
> On 11/21/19 5:27 PM, Viswanathan, Sandhya wrote:
>> On Skylake platform the JVM by default sets the UseAVX level to 2 and accordingly sets MaxVectorSize to 32 bytes as per JDK-8221092<https://bugs.openjdk.java.net/browse/JDK-8221092>.
>>
>> When the user explicitly wants to use AVX3 on Skylake platform, they need to invoke the JVM with -XX:UseAVX=3 command line argument.
>> This should automatically result in MaxVectorSize being set to 64 bytes.
>>
>> However post JDK-8221092<https://bugs.openjdk.java.net/browse/JDK-8221092>, when -XX:UseAVX=3 is given on command line, the MaxVectorSize is being wrongly set to 16 bytes.
>> I have a patch which fixes the issue.
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8234610
>> Webrev: http://cr.openjdk.java.net/~sviswanathan/8234610/webrev.00/
>>
>> Please review and approve.
>>
>> Best Regards,
>> Sandhya
>>
>>
More information about the hotspot-compiler-dev
mailing list