RFR: 8272493: Suboptimal code generation around Preconditions.checkIndex intrinsic with AVX2

Quan Anh Mai duke at openjdk.java.net
Thu Mar 10 09:08:41 UTC 2022


On Thu, 10 Mar 2022 08:59:35 GMT, Yi Yang <yyang at openjdk.org> wrote:

> do you mean the JVM is missing vzeroupper somewhere?

It seems currently we don't miss anything because handwritten intrinsics don't use 256-bit vectors on AVX1. What I meant by the missing part is that `clear_upper_avx` do not emit `vzeroupper` on AVX1, so if we want to use the full width we may miss some.

> It seems that currently we only emit vzeroupper on some function return or function call when they set clear_upper_avx flag or max_vector_size >16

Yes what I mean here is that even if we touch the YMM registers we still don't need to emit `vzeroupper` everywhere but on transition to codes not emitted by the hotspot assembler.

Thanks.

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

PR: https://git.openjdk.java.net/jdk/pull/7770


More information about the hotspot-compiler-dev mailing list