RFR: 8368722: Vector API intrinsic enabled wrongly on platforms not supporting misaligned vector access [v3]

Fei Yang fyang at openjdk.org
Fri Oct 10 02:39:02 UTC 2025


On Thu, 9 Oct 2025 18:51:05 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/vm_version_riscv.cpp line 184:
>> 
>>> 182:     FLAG_SET_DEFAULT(AlignVector,
>>> 183:       unaligned_vector.value() != MISALIGNED_VECTOR_FAST);
>>> 184:   } else if (AlignVector == false) {
>> 
>> Seems these code is not necessary, as when `unaligned_vector` is not retrieved from kernel for any reason, user might want to pass `-XX:-AlignVector`.
>> Your change disable this behaviour.
>
> It seems my advice is the opposite of @iwanowww's, let's see what others think.

Considering that the linux-riscv64 hwprobe syscall is not always usable for detecting support for misaligned vector access especially on old kernels, it makes sense to me that we should give the user a choice to decide.

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

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


More information about the hotspot-dev mailing list