[riscv-port] RFR: 8281967: riscv: Intrinsify bigIntegerLeftShift

Yanhong Zhu yzhu at openjdk.java.net
Mon Feb 28 11:22:02 UTC 2022

On Mon, 28 Feb 2022 10:30:23 GMT, Taiping Guo <tguo at openjdk.org> wrote:

> BigInteger intrinsic: bigIntegerLeftShift intrinsic is missed in current vm. It should be implemented.
> Considering that there is no hardware that supports rvv1.0, we use `test/jdk/java/math/BigInteger/ModPow.java` testcase to compare the number of instructions generated by C2 and intrinsic, and the instructions for the method `shiftLeftImplWorker` shows that the number of instructions generated by C2 is 9.2x that of intrinsic.
> Full jtreg tests on qemu are passed without new failures.

src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2898:

> 2896:     __ vse32_v(v0, newArr);
> 2897:     __ sub(numIter, numIter, t0);
> 2898:     if (UseRVB) {

Why not call `shadd` here like above?


PR: https://git.openjdk.java.net/riscv-port/pull/61

More information about the riscv-port-dev mailing list