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

Quan Anh Mai qamai at openjdk.org
Wed Apr 30 16:05:01 UTC 2025


On Wed, 30 Apr 2025 15:34:07 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> We can say that `tmp` is all the bits we can flip, although I think that is too ambiguous, what does "can" mean here. It is better to think of it as all the bits that are not lower than `first_violation` and are 0 in both `lo` and `zeros`.
>
> Hmm ok. Well it would still be helpful to at least have some kind of intuition, and "name" for it. Are all these bits the candidates for `alignment`, of we must pick the one most to the right, i.e. so that we get the smallest `alignment` value?
> And then why is it these bits, and not any others? An argument would be good here.

Hmmm these bits are the ones that are not lower than `first_violation` and are 0 in both `lo` and `zeros`. This description aligns perfectly with the conclusion in the formality section above. So what we are finding is the last such bit here. I say that in the following computation.

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

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


More information about the hotspot-compiler-dev mailing list