RFR: 8361836: RISC-V: Relax min vector length to 32-bit for short vectors [v2]

Dingli Zhang dzhang at openjdk.org
Thu Jul 10 09:26:53 UTC 2025


> Follow up [JDK-8359419](https://bugs.openjdk.org/browse/JDK-8359419), RVV supports all vector type conversion APIs in the Vector API.
> So we only need to relax the length limit of the short type to achieve a significant improvement in JMH performance for converting between short and wider types.
> 
> ### Test
> qemu-system UseRVV:
> * [x]  Run jdk_vector (fastdebug)
> * [x]  Run compiler/vectorapi (fastdebug)
> 
> ### Performance
> Following shows the performance improvement of relative VectorAPI JMHs on k1 (256-bit RVV):
> 
> 
> Benchmark                                             (SIZE)   Mode   Units   Before     After    Gain
> VectorFPtoIntCastOperations.microDouble128ToShort128     512  thrpt  ops/ms   52.280   840.112   16.07
> VectorFPtoIntCastOperations.microDouble128ToShort128    1024  thrpt  ops/ms   28.156   429.322   15.25
> VectorFPtoIntCastOperations.microFloat64ToShort64        512  thrpt  ops/ms   14.242   479.509   33.67
> VectorFPtoIntCastOperations.microFloat64ToShort64       1024  thrpt  ops/ms    6.906   242.690   35.14
> 
> PS: `VectorFPtoIntCastOperations.microFloat64ToShort64` is added by [JDK-8359419](https://bugs.openjdk.org/browse/JDK-8359419).

Dingli Zhang has updated the pull request incrementally with one additional commit since the last revision:

  Adjust the position of comment

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26239/files
  - new: https://git.openjdk.org/jdk/pull/26239/files/06598543..0773a366

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

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

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


More information about the hotspot-compiler-dev mailing list