Skip to content

Commit

Permalink
8334505: RISC-V: Several tests fail when MaxVectorSize does not match…
Browse files Browse the repository at this point in the history
… VM_Version::_initial_vector_length

Reviewed-by: fyang
  • Loading branch information
zifeihan authored and RealFYang committed Jun 26, 2024
1 parent f101e15 commit c66f785
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/hotspot/cpu/riscv/vm_version_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,11 @@ void VM_Version::c2_initialize() {
FLAG_SET_DEFAULT(MaxVectorSize, 0);
FLAG_SET_DEFAULT(UseRVVForBigIntegerShiftIntrinsics, false);
} else {
if (FLAG_IS_DEFAULT(MaxVectorSize)) {
MaxVectorSize = _initial_vector_length;
} else if (!is_power_of_2(MaxVectorSize)) {
vm_exit_during_initialization(err_msg("Unsupported MaxVectorSize: %d, must be a power of 2", (int)MaxVectorSize));
} else if (MaxVectorSize > _initial_vector_length) {
warning("Current system only supports max RVV vector length %d. Set MaxVectorSize to %d",
_initial_vector_length, _initial_vector_length);
MaxVectorSize = _initial_vector_length;
if (!FLAG_IS_DEFAULT(MaxVectorSize) && MaxVectorSize != _initial_vector_length) {
warning("Current system does not support RVV vector length for MaxVectorSize %d. Set MaxVectorSize to %d",
(int)MaxVectorSize, _initial_vector_length);
}
MaxVectorSize = _initial_vector_length;
if (MaxVectorSize < 16) {
warning("RVV does not support vector length less than 16 bytes. Disabling RVV.");
UseRVV = false;
Expand Down

1 comment on commit c66f785

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.