RFR(S): x86:8190934: Regressions on Haswell Xeon due to JDK-8178811

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Dec 14 18:32:53 UTC 2017


Thank you, Vivek

1. You don't need new INCLUDE_CLEAR_UPPER_AVX. The main issue is UseAVX 
flag is defined only on x86. You can use #ifdef X86 for that.

2. You don't need next guard

+#if INCLUDE_CLEAR_UPPER_AVX
+  clear_upper_avx();
+#endif

if you define empty body in else case (using #ifdef X86):

+  void clear_upper_avx() {
+#ifdef X86
+    if (UseAVX >= 2) {
+      C->set_clear_upper_avx(true);
+    }
+#endif
+  }

3. Factor next checks into one static method (similar to 
clear_avx_size()) to avoid next repetitive checks in .ad file:

(C->max_vector_size() > 16 || C->clear_upper_avx() == true)

4. remove unrelated change (empty line removed) in macroAssembler_x86.cpp

Thanks,
Vladimir

On 12/13/17 11:22 PM, Deshpande, Vivek R wrote:
> Hi Vladimir
> 
> I have a fix for the slowdown observed on haswell due to jdk-8178811.
> 
> The solution selectively generates vzeroupper when AVX2/ AVX512 
> instructions have been executed and before the transition to SSE code.
> 
> I tested this fix with the test case given with bug and SPECjbb2015.
> 
> Could you please review and sponsor the patch?
> 
> Webrev:
> 
> http://cr.openjdk.java.net/~vdeshpande/8190934/webrev.00/
> 
> I have also updated the bug: 
> https://bugs.openjdk.java.net/browse/JDK-8190934
> 
> Regards,
> 
> Vivek
> 


More information about the hotspot-compiler-dev mailing list