RFR: 8308084: C2 fix idom bug in PhaseIdealLoop::create_new_if_for_predicate [v2]

Vladimir Kozlov kvn at openjdk.org
Wed May 17 15:50:33 UTC 2023


On Wed, 17 May 2023 10:19:53 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Bug fixing to make the verification pass for https://github.com/openjdk/jdk/pull/13951 [JDK-8305073](https://bugs.openjdk.org/browse/JDK-8305073).
>> 
>> There only seemed to be one bug with idom that I could find up to **tier6 and stress testing**. That one bug already showed up with a simple `java -Xcomp --version`. But it is possible that there are more that we would find in the future, maybe with the fuzzer.
>> 
>> **Details about the bug** I fixed in `PhaseIdealLoop::create_new_if_for_predicate`:
>> We computed the `dom_lca_internal` for `rgn` too early - the following line can change the CFG such that the idom would change:
>> https://github.com/openjdk/jdk/blob/1e1abc4c086298060ccb13b63f646a298bbe3ef7/src/hotspot/share/opto/loopPredicate.cpp#L216
>> 
>> So I moved the idom computation down, until after we do not change the CFG anymore, and idom should be stable from there on.
>
> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
> 
>  - merge from master after Assertion Predicate renaming
>  - 8308084: C2 fix idom bug in PhaseIdealLoop::create_new_if_for_predicate

Marked as reviewed by kvn (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/13980#pullrequestreview-1431039166


More information about the hotspot-compiler-dev mailing list