File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -444,7 +444,19 @@ void VM_Version::initialize() {
444
444
}
445
445
446
446
if (UseSVE > 0 ) {
447
- _initial_sve_vector_length = get_current_sve_vector_length ();
447
+ int vl = get_current_sve_vector_length ();
448
+ if (vl < 0 ) {
449
+ warning (" Unable to get SVE vector length on this system. "
450
+ " Disabling SVE. Specify -XX:UseSVE=0 to shun this warning." );
451
+ FLAG_SET_DEFAULT (UseSVE, 0 );
452
+ } else if ((vl == 0 ) || ((vl % FloatRegister::sve_vl_min) != 0 ) || !is_power_of_2 (vl)) {
453
+ warning (" Detected SVE vector length (%d) should be a power of two and a multiple of %d. "
454
+ " Disabling SVE. Specify -XX:UseSVE=0 to shun this warning." ,
455
+ vl, FloatRegister::sve_vl_min);
456
+ FLAG_SET_DEFAULT (UseSVE, 0 );
457
+ } else {
458
+ _initial_sve_vector_length = vl;
459
+ }
448
460
}
449
461
450
462
// This machine allows unaligned memory accesses
You can’t perform that action at this time.
0 commit comments