RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes

Emanuel Peter epeter at openjdk.org
Mon Nov 25 09:08:19 UTC 2024


On Mon, 25 Nov 2024 09:00:54 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> This PR introduces
>> - several new optimizations to unsigned division and modulo
>>    - x % 1, x % x, x % 2^k
>>    - x / 1, x / x, x / 2^k 
>>    - does not implement the Granlund and Montgomery algorithm, which has been implemented for signed modulo division in the past. It is unclear if a lot is to be gained by implementing this.
>> - tests to test existing optimizations for signed division and modulo 
>>    - does not test the Granlund and Montgomery algorithm directly
>
> test/hotspot/jtreg/compiler/c2/irTests/ModLNodeIdealizationTests.java line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
> 
> Suggestion:
> 
>  * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.

Same with the others

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22061#discussion_r1856175504


More information about the hotspot-compiler-dev mailing list