RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes
theoweidmannoracle
duke at openjdk.org
Wed Nov 13 12:01:23 UTC 2024
On Wed, 13 Nov 2024 11:27:57 GMT, Quan Anh Mai <qamai 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
>
> This seems similar to #9947 . Feel free to take over if you are working on this as I am not working on the PR right now and I forgot which state it is in.
@merykitty Thanks for the pointer. If I understand correctly, your PR is more focused on improving division by applying numerical transformations, while the focus of this PR is to add basic optimizations to unsigned division and modulo (such as division by 1) and test the optimizations present for signed division. So I think your PR would indeed complement this PR very well.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22061#issuecomment-2473392391
More information about the hotspot-compiler-dev
mailing list