On Tue, 5 May 2026 05:32:20 GMT, Quan Anh Mai <[email protected]> wrote:

> Hi,
> 
> I was reminded of this forgotten PR when reviewing a counted loop 
> transformation PR. The important point is that it is easier and more 
> efficient to compute the trip count of a counted loop using unsigned 
> division. Currently, for int counted loops, trip count is computed by 
> extending the loop parameters to long and doing a signed long division. This 
> cannot be applied to long counted loop. As a result, as a precondition for 
> long counted loop predication, we need to be able to efficiently transform an 
> unsigned division by constant.
> 
> For more information, please refer to #9947 .
> 
> 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).

@eme64 @rgiulietti @vnkozlov As you have reviewed the previous PR, can you take 
a look at this when you have time, please? Thanks a lot.

test/hotspot/jtreg/compiler/c2/irTests/DivINodeIdealizationTests.java line 2:

> 1: /*
> 2:  * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights 
> reserved.

Should fix this in the next commit, same to `DivLNodeIdealizationTests`

test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java line 574:

> 572:     }
> 573: 
> 574:     public static final String CMOVE_VD = PREFIX + "CMOVE_VD" + POSTFIX;

Seems like a mistake, should be removed.

test/micro/org/openjdk/bench/java/lang/IntegerDivMod.java line 2:

> 1: /*
> 2:  * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights 
> reserved.

Should fix copyright year, same with `LongDivMod`.

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

PR Comment: https://git.openjdk.org/jdk/pull/31033#issuecomment-4376764448
PR Review Comment: https://git.openjdk.org/jdk/pull/31033#discussion_r3186239053
PR Review Comment: https://git.openjdk.org/jdk/pull/31033#discussion_r3186241274
PR Review Comment: https://git.openjdk.org/jdk/pull/31033#discussion_r3186244957

Reply via email to