JDK-8234610 : MaxVectorSize set wrongly when UseAVX=3 is specified after JDK-8221092
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.6,11.0.6-oracle,14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2019-11-22
  • Updated: 2020-06-01
  • Resolved: 2019-11-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.7-oracleFixed 13.0.3Fixed 14 b25Fixed
Related Reports
Relates :  
Description
On Skylake platform the JVM by default sets the UseAVX level to 2 and accordingly sets MaxVectorSize to 32 bytes as per JDK-8221092.
When the user explicitly want to use AVX3 on skylake platform they need to invoke the JVM with -XX:UseAVX=3 command line argument. This should aumatically result in MaxVectorSize being set to 64 bytes. However post JDK-8221092, when -XX:UseAVX=3 is given on command line, the MaxVectorSize is being wrongly set to 16 bytes. 
Comments
13u Fix Request Backporting this patch fixes a performance regression. Applies cleanly
25-03-2020

Fix Request (11u) This fixes the regression in 11u, and matches codebases (I see 11.0.7-oracle). Patch applies cleanly to 11u, passes tier1, tier2, tier3 suites on Linux x86_64. Additionally verified MaxVectorSize on my SKL-X. Unpatched JDK reports "16", while patched one reports "64", in line with original bug report.
03-02-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/dff8053bdb74 User: vlivanov Date: 2019-11-26 16:20:15 +0000
26-11-2019

First webrev: http://cr.openjdk.java.net/~sviswanathan/8234610/webrev.00/ Updated webrev: http://cr.openjdk.java.net/~sviswanathan/8234610/webrev.01/
23-11-2019

initial ILW = (H) Wrongly set MaxVectorSize, performance impact, recent regression in JDK 14; (L) only with selected microarchitecture platforms; (H) none = HLH = P2
22-11-2019