RFR(S): x86: 8190494: fix for different results with UseAVX=3 when calling AVX-512 native function via JNI.

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Dec 1 00:35:11 UTC 2017


Got it.

Thanks,
Vladimir

On 11/30/17 4:18 PM, Deshpande, Vivek R wrote:
> Hi Vladimir
> 
> We need no_mask_reg set as true for  vector word instructions: pblendw, vphaddw, phaddw.
> For rest of the instructions we don’t need to remove mask register encoding.
> 
> Regards,
> Vivek
> 
> -----Original Message-----
> From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com]
> Sent: Thursday, November 30, 2017 3:44 PM
> To: Deshpande, Vivek R <vivek.r.deshpande at intel.com>; hotspot-compiler-dev at openjdk.java.net
> Cc: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>
> Subject: Re: RFR(S): x86: 8190494: fix for different results with UseAVX=3 when calling AVX-512 native function via JNI.
> 
> On 11/30/17 2:51 PM, Deshpande, Vivek R wrote:
>> HI Vladimir
>>
>> We are removing the mask register encoding from the scalar instructions as it is not needed. The JIT is not doing any masked scalar operations.
> 
> Does it affect execution if we don't remove mask register encoding?
> 
> Thanks,
> Vladimir
> 
>>
>> Regards,
>> Vivek
>>
>> -----Original Message-----
>> From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com]
>> Sent: Thursday, November 30, 2017 8:56 AM
>> To: Deshpande, Vivek R <vivek.r.deshpande at intel.com>;
>> hotspot-compiler-dev at openjdk.java.net
>> Cc: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>
>> Subject: Re: RFR(S): x86: 8190494: fix for different results with UseAVX=3 when calling AVX-512 native function via JNI.
>>
>> Thank you, Vivek
>>
>> Changes looks good based on your description.
>>
>> Please, explain why using mask register in scalar instructions is bad.
>>
>> I will start pre-integration testing and let you know results.
>>
>> Thanks,
>> Vladimir
>>
>> On 11/30/17 7:28 AM, Deshpande, Vivek R wrote:
>>> Hi
>>>
>>> I have bug fix for 8190494: Different results with UseAVX=3 when calling AVX-512 native function via JNI.
>>>
>>> Mask register not being reset after JNI and the scalar floating point
>>> instructions using the mask register encoding with AVX 512 in the assembler causing this problem.
>>>
>>> I have tested it with jtreg on hotspot/compiler and SPECjvm2008 on knights landing and skylake.
>>>
>>> Webrev:
>>>
>>> http://cr.openjdk.java.net/~vdeshpande/8190494/webrev.00/
>>>
>>> I have also updated the JBS entry.
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8190494
>>>
>>> Would you please review and sponsor it.
>>>
>>> Regards,
>>>
>>> Vivek
>>>


More information about the hotspot-compiler-dev mailing list