On Sat, 5 Sep 2026 17:47:55 GMT, Quan Anh Mai <[email protected]> wrote:

>> Hi,
>> 
>> This PR implements addition and subtraction of 128-bit integers in C2. This 
>> may have numerous applications:
>> 
>> - It helps intrinsification of operations on 128-bit integers when we have 
>> one.
>> - It allows computation that may be incorrect at `long` due to overflow, 
>> such as loop predication of long range checks.
>> 
>> By implementing this separately, we don't need to worry about finalizing a 
>> public API, and we can have a better testing coverage.
>> 
>> Testing:
>> 
>> - [x] tier1-4,hs-comp-stress
>> 
>> Please take a look and leave your review, thanks a lot.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Quan Anh Mai has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains 12 commits:
> 
>  - Merge branch 'master' into int128
>  - Fix typos
>  - Remove redundant keywords
>  - Pseudocode
>  - Merge branch 'master' into int128
>  - Use TypeTuple::LONG_PAIR
>  - Merge branch 'master' into int128
>  - C++17
>  - Merge branch 'master' into int128
>  - Merge branch 'master' into int128
>  - ... and 2 more: https://git.openjdk.org/jdk/compare/f0952f6c...53b59c71

`Int128T` sounds like an instantiated class instead of a utility class. (I 
think `Int128` would be better for that too, given Java has no `_t` suffix 
tradition.) Looking at `jdk.internal.vm.vector.Float16Math`, maybe 
`jdk.internal.math.Int128Math` would be a better home for this class?

src/java.base/share/classes/jdk/internal/misc/Int128T.java line 33:

> 31:  * implementation of corresponding C2 nodes.
> 32:  */
> 33: public class Int128T {

Let's make this utility class final and add a private constructor.

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

PR Comment: https://git.openjdk.org/jdk/pull/31008#issuecomment-5556774878
PR Review Comment: https://git.openjdk.org/jdk/pull/31008#discussion_r3942887024

Reply via email to