Skip to content

Commit ee45ba9

Browse files
committed
8359218: RISC-V: Only enable CRC32 intrinsic when AvoidUnalignedAccess == false
Backport-of: 65e63b6ab4241fc9d683e2ffa5bfe6e1a30059b6
1 parent bff98e7 commit ee45ba9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hotspot/cpu/riscv/vm_version_riscv.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ void VM_Version::common_initialize() {
203203
}
204204
}
205205

206-
// Misc Intrinsics could depend on RVV
206+
// Misc Intrinsics that could depend on RVV.
207207

208-
if (UseZba || UseRVV) {
208+
if (!AvoidUnalignedAccesses && (UseZba || UseRVV)) {
209209
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
210210
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true);
211211
}
212212
} else {
213213
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
214-
warning("CRC32 intrinsic requires Zba or RVV instructions (not available on this CPU)");
214+
warning("CRC32 intrinsic are not available on this CPU.");
215215
}
216216
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
217217
}

0 commit comments

Comments
 (0)