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

Fei Yang fyang at openjdk.org
Tue Apr 29 08:24:45 UTC 2025


On Tue, 29 Apr 2025 07:17:01 GMT, Gui Cao <gcao at openjdk.org> wrote:

> 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)

Looks reasonable. Thanks!

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

Marked as reviewed by fyang (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24943#pullrequestreview-2802481984


More information about the hotspot-compiler-dev mailing list