RFR: 8318723: RISC-V: C2 UDivL [v3]

Hamlin Li mli at openjdk.org
Thu Oct 26 10:13:46 UTC 2023


> Hi,
> Can you review the change to add intrinsic for UDivI and UDivL?
> Thanks!
> 
> 
> ## Tests
> 
> ### Functionality
> Run tests successfully found via `grep -nr test/jdk/ -we divideUnsigned` and `grep -nr test/hotspot/ -we divideUnsigned` 
> 
> ### Performance
> ( NOTE: there are another 2 related issues: https://bugs.openjdk.org/browse/JDK-8318225, https://bugs.openjdk.org/browse/JDK-8318226, the pr of which will be subseqently sent out after this one finished. )
> 
> #### Long
> **NOTE: for positive divisor, it's the common case; for negative divisor, it's a rare case**
> 
> **Before**
> 
> LongDivMod.testDivideUnsigned                    1024          mixed  avgt   10  19684.873 ± 21.882  ns/op
> LongDivMod.testDivideUnsigned                    1024       positive  avgt   10  28853.041 ±  6.425  ns/op
> LongDivMod.testDivideUnsigned                    1024       negative  avgt   10   6367.239 ± 16.011  ns/op
> 
> 
> **After**
> 
> LongDivMod.testDivideUnsigned                    1024          mixed  avgt   10  22622.133 ±  7.158  ns/op
> LongDivMod.testDivideUnsigned                    1024       positive  avgt   10  15957.272 ±  3.174  ns/op
> LongDivMod.testDivideUnsigned                    1024       negative  avgt   10  29499.721 ± 10.404  ns/op
> 
> 
> #### Integer
> **Before**
> 
> IntegerDivMod.testDivideUnsigned                    1024          mixed  avgt   10  23397.267 ± 36.980  ns/op
> IntegerDivMod.testDivideUnsigned                    1024       positive  avgt   10  16792.414 ±  5.869  ns/op
> IntegerDivMod.testDivideUnsigned                    1024       negative  avgt   10  30184.357 ± 55.464  ns/op
> 
> 
> **After**
> 
> IntegerDivMod.testDivideUnsigned                    1024          mixed  avgt   10  23210.437 ±  4.463  ns/op
> IntegerDivMod.testDivideUnsigned                    1024       positive  avgt   10  16622.342 ±  4.047  ns/op
> IntegerDivMod.testDivideUnsigned                    1024       negative  avgt   10  30013.414 ± 48.695  ns/op
> 
> 
> 
> /************ following is just backup: quick path for negative divisor *************/
> #### Long
> **Before**
> 
> LongDivMod.testDivideUnsigned                    1024          mixed  avgt   10  19704.317 ± 64.078  ns/op
> LongDivMod.testDivideUnsigned                    1024       positive  avgt   10  28856.859 ± 14.901  ns/op
> LongDivMod.testDivideUnsigned                    1024       negative  avgt   10   6364.974 ±  2.465  ns/op
> 
> 
> **After v1**
> (This is a simpler version, please check the diff from `After v2` below)
> 
> LongDivMod.testDivideUnsigned                    1024  ...

Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:

  Fix format for UdivL

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16346/files
  - new: https://git.openjdk.org/jdk/pull/16346/files/319be70a..ba16fb12

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

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

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


More information about the hotspot-dev mailing list