From 587f2b4b4dd73733a6ee247200371f8a8d0299c1 Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Wed, 20 Nov 2024 08:49:35 +0000 Subject: [PATCH] 8343827: RISC-V: set AlignVector as false if applicable to enable SLP Reviewed-by: fyang, luhenry --- src/hotspot/cpu/riscv/vm_version_riscv.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/hotspot/cpu/riscv/vm_version_riscv.cpp b/src/hotspot/cpu/riscv/vm_version_riscv.cpp index dddded795fa..3b8d8119a8e 100644 --- a/src/hotspot/cpu/riscv/vm_version_riscv.cpp +++ b/src/hotspot/cpu/riscv/vm_version_riscv.cpp @@ -150,11 +150,12 @@ void VM_Version::common_initialize() { } if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) { - if (unaligned_access.value() != MISALIGNED_FAST) { - FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true); - } else { - FLAG_SET_DEFAULT(AvoidUnalignedAccesses, false); - } + FLAG_SET_DEFAULT(AvoidUnalignedAccesses, + unaligned_access.value() != MISALIGNED_FAST); + } + + if (FLAG_IS_DEFAULT(AlignVector)) { + FLAG_SET_DEFAULT(AlignVector, AvoidUnalignedAccesses); } // See JDK-8026049