RFR: 8316933: RISC-V: compiler/vectorapi/VectorCastShape128Test.java fails when using RVV [v2]

Gui Cao gcao at openjdk.org
Tue Sep 26 09:36:44 UTC 2023


> Hi, we are experiencing test failures in test/hotspot/jtreg/compiler/vectorapi/VectorCastShape128Test.java using latest qemu, see jbs issue for exception information.
> 
> 
> zifeihan at plct-c8:~/qemu-master-riscv64/bin$ ./qemu-riscv64 -version
> qemu-riscv64 version 8.1.50
> Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
> 
> By the way, using a lower version of qemu (qemu-riscv64 version 7.0.91) no such problems were encountered. we infer that version 8.1.50 of qemu adds better checks.
> 
> 
> /home/zifeihan/jtreg/bin/jtreg -J-Djavatest.maxOutputSize=500000 -Djdk.lang.Process.launchMechanism=vfork -v:default -concurrency:48 -timeout:50 -javaoption:-XX:+UnlockExperimentalVMOptions -javaoption:-XX:+UseRVV -jdk:/home/zifeihan/jdk/build/linux-riscv64-server-fastdebug/jdk -compilejdk:/home/zifeihan/jdk-rvv/build/linux-x86_64-server-release/jdk /home/zifeihan/jdk/test/hotspot/jtreg/compiler/vectorapi/VectorCastShape128Test.java
> 
> 1. SEW setting is not accurate
> 
> https://github.com/openjdk/jdk/blob/e2e8e8e210ea9a7a9d901a1da729551714015d04/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp#L2195-L2207
> 
> The reason for the error reported for the vcvtFtoX_narrow node is because the vmfeq_vv directive is used here, but when the macro is called, the vsetvli type is set to T_SHORT, not T_FLOAT, so an exception occurs here. 
> 
> For vcvtFtoL, vcvtDtoX_narrow nodes, there was also the problem of inaccurate setting of both SEW, which is also changed here.
> 
> 2. Register usage constraints
> For the vcvtStoX_fp_extend node, the operands of the vfwcvt_f_f_v instruction inside, the same register cannot be used here[1], so that has also been modified.
> 
> [1] https://github.com/riscv/riscv-v-spec/blob/v1.0/v-spec.adoc#sec-vec-operands
> 
> ### Testing:
> qemu 8.1.50 with UseRVV:
> - [x] Tier1 tests (release)
> - [x] Tier2 tests (release)
> - [ ] Tier3 tests (release)
> - [x] test/jdk/jdk/incubator/vector (fastdebug)

Gui Cao has updated the pull request incrementally with one additional commit since the last revision:

  Format code

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/15911/files
  - new: https://git.openjdk.org/jdk/pull/15911/files/6eb3fa51..ecdd2709

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15911&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15911&range=00-01

  Stats: 7 lines in 1 file changed: 0 ins; 0 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/15911.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15911/head:pull/15911

PR: https://git.openjdk.org/jdk/pull/15911


More information about the hotspot-compiler-dev mailing list