RFR: 8355878: RISC-V: jdk/incubator/vector/DoubleMaxVectorTests.java fails when using RVV

Gui Cao gcao at openjdk.org
Tue Apr 29 07:49:21 UTC 2025


Hi, when I use the qemu-system mode, the jdk/incubator/vector/DoubleMaxVectorTests.java test run fails.

As discussed on JBS, As discussed on jbs, the SIGILL instruction is vmv1r.v v1,v3. 

I found the cause of the problem on the qemu source code, qemu Add vill check for whole vector register move instructions [1]. 

  The ratified version of RISC-V V spec section 16.6 says that `The instructions operate as if EEW=SEW`.

So the whole vector register move instructions depend on the vtype

We need to add vsetvli before move vector register. In order not to have a misunderstanding here, maybe Vector Whole Vector Register Move without setting vsetvli, I replaced vmv1r_v with vmv_v_v.


[1] https://patchwork.kernel.org/project/qemu-devel/patch/20231129170400.21251-2-max.chou@sifive.com/#25621160

### Testing

qemu-system 9.1.50 with UseRVV:

- [x] Run test/jdk/jdk/incubator/vector (fastdebug)

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

Commit messages:
 - 8355878: RISC-V: jdk/incubator/vector/DoubleMaxVectorTests.java fails when using RVV

Changes: https://git.openjdk.org/jdk/pull/24943/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24943&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8355878
  Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24943.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24943/head:pull/24943

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


More information about the hotspot-compiler-dev mailing list