--- a/src/hotspot/cpu/x86/vm_version_x86.cpp Mon Jun 11 14:06:50 2018 -0700
+++ b/src/hotspot/cpu/x86/vm_version_x86.cpp Tue Jun 12 21:29:47 2018 -0700
@@ -1396,6 +1396,16 @@
FLAG_SET_DEFAULT(UseFastStosb, false);
}
+ // Use XMM/YMM MOVDQU instruction for Object Initialization
+ if (!UseFastStosb && UseSSE >= 2 && UseUnalignedLoadStores) {
+ if (FLAG_IS_DEFAULT(UseXMMForObjInit)) {
+ UseXMMForObjInit = true;
+ }
+ } else if (UseXMMForObjInit) {
+ warning("UseXMMForObjInit requires SSE2 and unaligned load/stores. Feature is switched off.");
+ FLAG_SET_DEFAULT(UseXMMForObjInit, false);
+ }
+
#ifdef COMPILER2
if (FLAG_IS_DEFAULT(AlignVector)) {
// Modern processors allow misaligned memory operations for vectors.