RFR (XXS) 8234610: MaxVectorSize set wrongly when UseAVX=3 is specified after JDK-8221092

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Fri Nov 22 12:39:07 UTC 2019


Hi Sandhya,

> 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.

Please, elaborate how it happens and how legacy_setup affects it?

Why 8221092 needs the code you conditionally exclude.
Why the following isn't enough?

    if (FLAG_IS_DEFAULT(UseAVX)) {
      FLAG_SET_DEFAULT(UseAVX, use_avx_limit);
+    if (is_intel_family_core() && _model == CPU_MODEL_SKYLAKE && 
_stepping < 5) {
+      FLAG_SET_DEFAULT(UseAVX, 2);  //Set UseAVX=2 for Skylake
+    }
    } else if (UseAVX > use_avx_limit) {

Best regards,
Vladimir Ivanov


More information about the hotspot-compiler-dev mailing list