--- 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