RFR: 8282365: Optimize divideUnsigned and remainderUnsigned for constants [v16]
Emanuel Peter
epeter at openjdk.org
Mon Jul 3 13:29:31 UTC 2023
On Mon, 3 Jul 2023 12:43:57 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/divnode.cpp line 947:
>>
>>> 945:
>>> 946: // Divisor very large, constant 2**31 can be transform to a shift
>>> 947: if (ti->_hi <= 0 && ti->_hi > min_jint) {
>>
>> Would be easier to read as a range like this
>> Suggestion:
>>
>> if (min_jint < ti->_hi && ti->_hi <= 0) {
>
> Do we have test cases for this?
Especially we need a variable case that does not constant fold
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/9947#discussion_r1250834879
More information about the hotspot-compiler-dev
mailing list