RFR: 8365302: RISC-V: compiler/loopopts/superword/TestAlignVector.java fails when vlen=128

Dingli Zhang dzhang at openjdk.org
Tue Aug 12 06:45:55 UTC 2025


Hi all,
Please take a look and review this PR, thanks!

[JDK-8352529](https://bugs.openjdk.org/browse/JDK-8352529) enables this IR verification test for riscv. This test pass when vlen=256, but fail when vlen=128.

The error occurs because the test13aIL and test13bIL cases require ensuring that vectors are larger than what unrolling produces; otherwise, the corresponding vector IR will not be generated.

We can use `JTREG="JAVA_OPTIONS=-XX:+TraceSuperWordLoopUnrollAnalysis"` during testing. 
The tips in the log:

76844 1333 b 4 compiler.loopopts.superword.TestAlignVector::test13aIL (42 bytes)
slp analysis fails: unroll limit greater than max vector

slp analysis: set max unroll to 4


Therefore, we need to limit MaxVectorSize to greater than or equal to 32 bytes.

### Test (fastdebug)
- [x] Run compiler/loopopts/superword/TestAlignVector.java on qemu-system with RVV when vlen=128/256

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

Commit messages:
 - 8365302: RISC-V: compiler/loopopts/superword/TestAlignVector.java fails when vlen=128

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

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


More information about the hotspot-compiler-dev mailing list