RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v57]
Quan Anh Mai
qamai at openjdk.org
Fri May 2 11:38:47 UTC 2025
On Fri, 2 May 2025 09:37:33 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/gtest/utilities/test_intn_t.cpp line 51:
>>
>>> 49: test_intn_t<7>();
>>> 50: test_intn_t<8>();
>>> 51: }
>>
>> And how about some tests for `uintn_t`?
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r2071486369
More information about the hotspot-compiler-dev
mailing list