RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes [v17]
Emanuel Peter
epeter at openjdk.org
Tue Dec 3 06:34:44 UTC 2024
On Mon, 2 Dec 2024 16:38:03 GMT, theoweidmannoracle <duke 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
>
> theoweidmannoracle has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update UDivINodeIdealizationTests.java
> - Remove more magic numbers
Thanks for the updates, great work!
Yeah, the templates seem to be the better solution indeed :)
Ship it 🚢
(Though please hold off until RDP1 on Dec 5, so that it only goes into JDK25 and we have more time if things break)
-------------
Marked as reviewed by epeter (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22061#pullrequestreview-2474699695
More information about the hotspot-compiler-dev
mailing list