RFR: 8282365: Optimize divideUnsigned and remainderUnsigned for constants [v18]
Quan Anh Mai
qamai at openjdk.org
Fri Oct 6 17:54:24 UTC 2023
On Tue, 22 Aug 2023 17:23:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> @eme64 Because the division is transformed before it even appears on the graph, so the most simple solution to have an arbitrary value range for the dividend is to use a pair of min/max nodes to clamp the input and inform the compiler about the value set of the dividend. Thanks.
>
> @merykitty another way to easily get a value range it to use a `Phi` node which merges two constants. Have you tried that?
>
> long x;
> if (flag) {
> x = 10;
> } else {
> x = 100;
> }
> // Phi for x should have range long:10..100
@eme64 Thanks for your reviews, I have addressed those.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/9947#issuecomment-1751187796
More information about the hotspot-compiler-dev
mailing list