RFR: 8282365: Optimize divideUnsigned and remainderUnsigned for constants [v16]
Quan Anh Mai
qamai at openjdk.org
Wed Jul 12 16:14:23 UTC 2023
On Mon, 3 Jul 2023 12:22:53 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/divnode.cpp line 441:
>>
>>> 439: jlong magic_const;
>>> 440: jint shift_const;
>>> 441: bool magic_const_ovf;
>>
>> `does_magic_const_overflow` Would that work too?
>
> I'm not sure exactly what this boolean means, and it is making it diffucult to undersand the logic below
The constant is a u65, this boolean indicates whether the constant does not fit into a u64. We need to compute `[x * M / 2**s]`. If `M` is not a u64 then it is `M1 + 2**64`, which results in the mathematical transformation I wrote below around line 465.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/9947#discussion_r1261413399
More information about the hotspot-compiler-dev
mailing list