RFR: 8320206: Some intrinsics/stubs missing vzeroupper on x86_64

Sandhya Viswanathan sviswanathan at openjdk.org
Fri Nov 17 20:08:45 UTC 2023


On Fri, 17 Nov 2023 15:57:50 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> @vnkozlov  
>> Currently in the stock JVM we are generating vzeroupper at the end of a stub and at the end of a C2 jitted method only if it has larger than 128-bit vector instructions. For a C2 jitted method, this could be either due to auto vectorization or due to inline intrinsics. The clear_upper_avx() only marks that the method has larger vectors. The vzeroupper is generated in the method epilog when the marker is found set for the method.
>> 
>> This PR is not deviating from that scheme. 
>> 
>> We settled on this scheme based during our discussion on [JDK-8178811](https://bugs.openjdk.org/browse/JDK-8178811) and its followup [JDK-8190934](https://bugs.openjdk.org/browse/JDK-8190934). The discussion thread for prior is at https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2017-April/026049.html. As part of JDK-8190934 we restricted vzeroupper generation in the epilog of c2 jitted method from always to only when larger vectors are used in the method. This had resolved any over generation of vzeroupper.
>
> @sviswa7 please, file followup RFEs based on my and Vladimir's Ivanov comments.

@vnkozlov @jatin-bhateja @iwanowww Thanks a lot for the reviews. I have filed a RFE (https://bugs.openjdk.org/browse/JDK-8320346).

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

PR Comment: https://git.openjdk.org/jdk/pull/16678#issuecomment-1817014629


More information about the hotspot-compiler-dev mailing list