8220656: ARM32: -XX:MaxVectorSize=16 makes SIGILL
authorbulasevich
Fri, 17 May 2019 03:01:21 -0400
changeset 54919 21925121a917
parent 54918 b88bcaa94c10
child 54920 6a6935abebe8
8220656: ARM32: -XX:MaxVectorSize=16 makes SIGILL Reviewed-by: dholmes, dlong
src/hotspot/cpu/arm/vm_version_arm_32.cpp
--- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp	Thu May 16 13:21:41 2019 +0200
+++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp	Fri May 17 03:01:21 2019 -0400
@@ -300,10 +300,12 @@
     // SIMD/NEON can use 16, but default is 8 because currently
     // larger than 8 will disable instruction scheduling
     FLAG_SET_DEFAULT(MaxVectorSize, 8);
-  }
-
-  if (MaxVectorSize > 16) {
-    FLAG_SET_DEFAULT(MaxVectorSize, 8);
+  } else {
+    int max_vector_size = has_simd() ? 16 : 8;
+    if (MaxVectorSize > max_vector_size) {
+      warning("MaxVectorSize must be at most %i on this platform", max_vector_size);
+      FLAG_SET_DEFAULT(MaxVectorSize, max_vector_size);
+    }
   }
 #endif