RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v2]
Quan Anh Mai
qamai at openjdk.org
Mon Jan 22 18:31:53 UTC 2024
On Mon, 22 Jan 2024 09:42:33 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix tests, add verify
>
> src/hotspot/share/opto/rangeinference.cpp line 164:
>
>> 162: U zeros2 = zeros;
>> 163: U ones2 = ones;
>> 164: normalize_constraints_simple(empty2, lo2, hi2, zeros2, ones2);
>
> At a quick glance of the code, it is not immediately clear why we need 2 ranges here. Can you add some comments, or maybe improve the naming from 1 and 2 to something more expressive?
I have added explanations, basically the intersection of the signed and unsigned ranges is the union of 2 ranges, 1 in the negative range and the other in the positive one. We then process these separately and merge the results.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r1462249445
More information about the hotspot-compiler-dev
mailing list