changeset 56272:21925121a917

8220656: ARM32: -XX:MaxVectorSize=16 makes SIGILL Reviewed-by: dholmes, dlong
author bulasevich
date Fri, 17 May 2019 03:01:21 -0400
parents b88bcaa94c10
children 6a6935abebe8
files src/hotspot/cpu/arm/vm_version_arm_32.cpp
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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