RFR: 8368722: Vector API intrinsics enabled wrongly on platforms without support for misaligned vector access [v8]

Dingli Zhang dzhang at openjdk.org
Wed Oct 22 04:42:25 UTC 2025


On Wed, 22 Oct 2025 03:47:22 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Dingli Zhang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add missing headers
>
> src/hotspot/cpu/riscv/vm_version_riscv.cpp line 228:
> 
>> 226:   if (UseRVV) {
>> 227:     if (!unaligned_vector.enabled() && AlignVector == false) {
>> 228:       if (!VM_Version::detect_misaligned_vector_support()){
> 
> Suggestion:
> 
>     // The hwprobe syscall won't be able to detect support for misaligned vector accesses on old kernels.
>     // Resort to detect_misaligned_vector_support() to see if misaligned vector accesses may trap or not.
>     if (!unaligned_vector.enabled()) {
>       if (AlignVector == false && !VM_Version::detect_misaligned_vector_support()) {

Fixed.

> src/hotspot/cpu/riscv/vm_version_riscv.cpp line 574:
> 
>> 572:     return true;
>> 573:   }
>> 574:   return false;
> 
> Suggestion: `return detect_misaligned_vector_stub() == 1;`

Thanks! Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27506#discussion_r2450411901
PR Review Comment: https://git.openjdk.org/jdk/pull/27506#discussion_r2450411248


More information about the hotspot-dev mailing list