Integrated: 8318723: RISC-V: C2 UDivL
Hamlin Li
mli at openjdk.org
Thu Oct 26 16:13:56 UTC 2023
On Tue, 24 Oct 2023 15:21:08 GMT, Hamlin Li <mli at openjdk.org> wrote:
> 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 ...
This pull request has now been integrated.
Changeset: 40a3c35a
Author: Hamlin Li <mli at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/40a3c35aa5614be4505013d4e92ddb1b556a3622
Stats: 70 lines in 7 files changed: 47 ins; 0 del; 23 mod
8318723: RISC-V: C2 UDivL
8318224: RISC-V: C2 UDivI
Reviewed-by: fyang, luhenry, aph
-------------
PR: https://git.openjdk.org/jdk/pull/16346
More information about the hotspot-dev
mailing list