--- old/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2017-11-29 17:39:33.427673100 -0800 +++ new/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2017-11-29 17:39:32.820395000 -0800 @@ -6609,6 +6609,13 @@ } // Clear upper bits of YMM registers to avoid SSE <-> AVX transition penalty. vzeroupper(); + // Reset k1 to 0xffff. + if (VM_Version::supports_evex()) { + push(rcx); + movl(rcx, 0xffff); + kmovwl(k1, rcx); + pop(rcx); + } #ifndef _LP64 // Either restore the x87 floating pointer control word after returning