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

Emanuel Peter epeter at openjdk.org
Mon May 5 07:14:08 UTC 2025


On Fri, 2 May 2025 11:35:33 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Those also have a lot more operations to test...
>
> The thing is that the other operations are so trivial that it would be counter-productive to test them, it is like testing `add(int x, int y) { return x + y; }` :) The operations I test here are the non-trivial ones, that is sign extension and comparison. I have added some sanity `static_assert` to catch off-by-one errors, though.

Well, it could be relatively easy to get a `>>` or equal operator wrong, because of the higher bits.
I tend to get these things wrong, and tests save me there. You are not me, so I leave it up to you ;)

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

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


More information about the hotspot-compiler-dev mailing list