Integrated: 8318225: RISC-V: C2 UModI
Hamlin Li
mli at openjdk.org
Sat Oct 28 09:15:41 UTC 2023
On Fri, 27 Oct 2023 09:15:11 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Hi,
> Can you review the change to add intrinsic for UModI and UModL?
> ( This is a quite similar patch to https://github.com/openjdk/jdk/pull/16346, which addresses UDivI and UDivL, so for the performance consideration please also check the discussion in that pr. )
> Thanks!
>
>
> ## Tests
>
> ### Functionality
> Run tests successfully found via `grep -nr test/jdk/ -we remainderUnsigned` and `grep -nr test/hotspot/ -we remainderUnsigned`
>
> ### Performance
>
> #### Long
> **NOTE: for positive divisor, it's the common case; for negative divisor, it's a rare case**
>
> **Before**
>
> LongDivMod.testRemainderUnsigned 1024 mixed avgt 10 21222.911 ± 57.735 ns/op
> LongDivMod.testRemainderUnsigned 1024 positive avgt 10 28841.429 ± 6.294 ns/op
> LongDivMod.testRemainderUnsigned 1024 negative avgt 10 7733.038 ± 3.856 ns/op
>
>
> **After**
>
> LongDivMod.testRemainderUnsigned 1024 mixed avgt 10 22666.448 ± 34.986 ns/op
> LongDivMod.testRemainderUnsigned 1024 positive avgt 10 15967.846 ± 24.805 ns/op
> LongDivMod.testRemainderUnsigned 1024 negative avgt 10 29507.865 ± 20.593 ns/op
>
>
> #### Integer
> **Before**
>
> IntegerDivMod.testRemainderUnsigned 1024 mixed avgt 10 23396.475 ± 24.065 ns/op
> IntegerDivMod.testRemainderUnsigned 1024 positive avgt 10 16796.796 ± 3.389 ns/op
> IntegerDivMod.testRemainderUnsigned 1024 negative avgt 10 30159.407 ± 6.716 ns/op
>
>
> **After**
>
> IntegerDivMod.testRemainderUnsigned 1024 mixed avgt 10 23216.710 ± 14.351 ns/op
> IntegerDivMod.testRemainderUnsigned 1024 positive avgt 10 16621.374 ± 3.203 ns/op
> IntegerDivMod.testRemainderUnsigned 1024 negative avgt 10 30002.088 ± 41.212 ns/op
This pull request has now been integrated.
Changeset: 1ec0d027
Author: Hamlin Li <mli at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/1ec0d02717b6be4faeb13cd0596d80eea90e81ed
Stats: 46 lines in 2 files changed: 44 ins; 0 del; 2 mod
8318225: RISC-V: C2 UModI
8318226: RISC-V: C2 UModL
Reviewed-by: luhenry, rehn, fyang
-------------
PR: https://git.openjdk.org/jdk/pull/16394
More information about the hotspot-dev
mailing list