From fc255c7c11af6a3e60e3cdd74ae0986579adbaae Mon Sep 17 00:00:00 2001
From: Dingli Zhang <dingli@iscas.ac.cn>
Date: Tue, 29 Apr 2025 22:41:45 +0800
Subject: [PATCH] Backport JDK-8352673: RISC-V: Vector can't be turned on with
-XX:+UseRVV
diff --git a/src/hotspot/cpu/riscv/vm_version_riscv.cpp b/src/hotspot/cpu/riscv/vm_version_riscv.cpp
index febe7cc0d73..97ac3a2e1d4 100644
--- a/src/hotspot/cpu/riscv/vm_version_riscv.cpp
+++ b/src/hotspot/cpu/riscv/vm_version_riscv.cpp
@@ -166,7 +166,7 @@ void VM_Version::initialize() {
}
if (UseRVV) {
- if (!ext_V.enabled()) {
+ if (!ext_V.enabled() && FLAG_IS_DEFAULT(UseRVV)) {
warning("RVV is not supported on this CPU");
FLAG_SET_DEFAULT(UseRVV, false);
} else {
--
2.34.1