Integrated: 8319408: RISC-V: MaxVectorSize is not consistently checked in several situations

Hamlin Li mli at openjdk.org
Tue Nov 7 09:53:47 UTC 2023


On Fri, 3 Nov 2023 16:11:15 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Hi,
> Can you review the change to fix the MaxVectorSize checking in vm_version_riscv.cpp?
> Thanks!
> 
> Current logic will not check whether (MaxVectorSize < 16), after the assignment `MaxVectorSize = _initial_vector_length;`, in following situation.
> a) if FLAG_IS_DEFAULT(MaxVectorSize) == true
> b) if FLAG_IS_DEFAULT(MaxVectorSize) == false and (MaxVectorSize >= 16) and is_power_of_2(MaxVectorSize) and (MaxVectorSize > _initial_vector_length)
> 
> And in original code, the logic is not consistent for the situations between MaxVectorSize < 16 and MaxVectorSize >= 16, when is_power_of_2(MaxVectorSize) == false; for the former (<16) it's to disable RVV, for the latter (>=16) it's vm_exit.

This pull request has now been integrated.

Changeset: 1c0e7b71
Author:    Hamlin Li <mli at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1c0e7b71b86cf735a251d5b6fe25b9c573fbec80
Stats:     16 lines in 1 file changed: 7 ins; 7 del; 2 mod

8319408: RISC-V: MaxVectorSize is not consistently checked in several situations

Reviewed-by: fyang

-------------

PR: https://git.openjdk.org/jdk/pull/16498


More information about the hotspot-dev mailing list