RFR: 8356647: C2: Excessively strict assert in PhaseIdealLoop::do_unroll [v2]
Tobias Hartmann
thartmann at openjdk.org
Fri May 23 06:49:00 UTC 2025
On Thu, 22 May 2025 15:34:15 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> This assert seems a bit too tight. See the JBS issue to check the math: the bound of `trip_count` should be `<= 2^31`, while the current bound is ` < (julong)max_juint/2` = floor((2^32-1)/2) = (2^32-2) / 2 = 2^31-1.
>
> Marc Chevalier has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - A test
> - Merge branch 'master' into fix/do_unroll-assert
> - Relax the assert
test/hotspot/jtreg/compiler/loopopts/UnrollWideLoopHitsTooStrictAssert.java line 27:
> 25: * @test
> 26: * @bug 8356647
> 27: * @summary C2's unrolling code has a too strict assert when a counted loop's range as wide as int's.
Suggestion:
* @summary C2's unrolling code has a too strict assert when a counted loop's range is as wide as an int.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25295#discussion_r2103918418
More information about the hotspot-compiler-dev
mailing list