Integrated: 8316933: RISC-V: compiler/vectorapi/VectorCastShape128Test.java fails when using RVV

Gui Cao gcao at openjdk.org
Wed Sep 27 07:21:24 UTC 2023


On Tue, 26 Sep 2023 06:19:21 GMT, Gui Cao <gcao at openjdk.org> wrote:

> 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)
> - [x] Tier3 tests (release)
> - [x] test/jdk/jdk/incubator/vector (fastdebug)

This pull request has now been integrated.

Changeset: e39197ec
Author:    Gui Cao <gcao at openjdk.org>
Committer: Fei Yang <fyang at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e39197ec62ca9363d9862d1ae1fca5b1b0286d59
Stats:     34 lines in 3 files changed: 9 ins; 9 del; 16 mod

8316933: RISC-V: compiler/vectorapi/VectorCastShape128Test.java fails when using RVV

Reviewed-by: fyang, dzhang

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

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


More information about the hotspot-compiler-dev mailing list