RFR: 8344306: RISC-V: Add zicond

Robbin Ehn rehn at openjdk.org
Tue Nov 26 09:09:39 UTC 2024


Hi, please consider.

In cpu models we save ~1 cycle per removed branch.
This patch removes ~0.1% of branches in generic C2 generated code.
We should probably investigate if we can improve/add peephole optimization to remove more branches.

As the C1 cmov code is a bit tricky I left that as a followup.

I added gtests for the cmovs.
(we should add coverage for more of masm in this gtest suit)
Pro tip, invoke the gtestLauncher directly (you only need to build exploded):
`gtestLauncher -jdk build/linux-riscv64-server-fastdebug/jdk/ --gtest_break_on_failure --gtest_filter="*RiscV*" -XX:+UnlockDiagnosticVMOptions -XX:+UseZicond -XX:ParallelGCThreads=1 -XX:ConcGCThreads=1 -XX:CICompilerCount=2`

Tested on Spacemit X60, gtests and tier1.

Thanks, Robbin

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

Commit messages:
 - Fixed ws
 - Draft

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

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


More information about the hotspot-dev mailing list