-
Bug
-
Resolution: Fixed
-
P3
-
19
-
b19
-
riscv
-
linux
But the TEMP_DEF for result in vcount_positives was missing, without which result != tmp could not be guaranteed.
If we add `assert_different_registers(result, tmp)` in `C2_MacroAssembler::count_positives_v`,
JVM will complain assertion error for some test in hotspot and langtools when UseRVV is enabled.
For example, on QEMU user mode with enabling RVV extension, the following jtreg tests commands will trigger assertion error:
jtreg -javaoption:-XX:+UseRVV -Djdk.lang.Process.launchMechanism=VFORK -timeoutFactor:20 -jdk:fastdebug/install-fastdebug/jvm/openjdk-19 test/langtools/tools/sjavac/JavacOptionPrep.java
```
javac: [-d, JTwork/classes/0/tools/sjavac/JavacOptionPrep.d, -sourcepath, test/langtools/tools/sjavac, -classpath, JTwork/classes/0/tools/sjavac/JavacOptionPrep.d, --add-exports=jdk.compiler/com.sun.tools.sjavac.options=ALL-UNNAMED, test/langtools/tools/sjavac/JavacOptionPrep.java]
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/register.hpp:245
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (src/hotspot/share/asm/register.hpp:245), pid=15559, tid=15600
# assert(regs[i] != regs[j]) failed: Multiple uses of register: c_rarg0
# JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-riscv64)
# Problematic frame:
# V [libjvm.so+0x58f38a] C2_MacroAssembler::count_positives_v(RegisterImpl const*, RegisterImpl const*, RegisterImpl const*, RegisterImpl const*)+0x96
```
With code base, test result for hotspot and langtools with RVV enabled:
test_hotspot:
applications/ctw/modules/java_base.java
applications/ctw/modules/java_xml.java
gc/metaspace/TestMetaspacePerfCounters.java
test_langtools:
Test results: passed: 4,228; failed: 73; error: 2
After is patch, failed tests in hotspot and langtools are passed:
test_langtools:
Test results: passed: 4,305
- relates to
-
JDK-8283364 riscv: Intrinsify countPositives
- Resolved
-
JDK-8284937 riscv: should not allocate special register for temp
- Resolved