RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v59]

Emanuel Peter epeter at openjdk.org
Mon May 5 06:42:08 UTC 2025


On Fri, 2 May 2025 16:38:59 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> You are diverting too much from the base assumption of this function. Formally, this function assumes that a result exists, which means that `i` exists, which leads to `tmp != 0`. The converse is also true, if `tmp != 0`, an index value `i` exists, which leads to a value not smaller than `lo` and satisfies `bits`. This implies that there does not exist one such value if and only if `tmp == 0`. In that case we know exactly that what we return satisfies bits. That's all we need to know in this section.
>
> I changed the comment at the return point of this function to highlight this fact more clearly.

To me it seemed you mentioned the case that there may be no such i from the beginning, where we have to return a value < lo. But I think it is ok now with your comments below as well.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r2072906513


More information about the hotspot-compiler-dev mailing list