RFR: 8282365: Optimize divideUnsigned and remainderUnsigned for constants [v4]
Quan Anh Mai
qamai at openjdk.org
Thu Sep 29 14:37:52 UTC 2022
On Tue, 27 Sep 2022 20:54:22 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> src/hotspot/share/opto/divnode.cpp line 1142:
>>
>>> 1140: }
>>> 1141:
>>> 1142: // Divisor very large, constant 2**31 can be transform to a shift
>>
>> @vnkozlov Oh the transformation is here
>
> It only works for cases with narrowed type. Which is not common case unless Java user's code check for that.
May you expand on this, please? How can I know that a divisor is negative without using its type information? Thanks.
-------------
PR: https://git.openjdk.org/jdk/pull/9947
More information about the hotspot-compiler-dev
mailing list