RFR: 8308084: C2 fix idom bug in PhaseIdealLoop::create_new_if_for_predicate
Christian Hagedorn
chagedorn at openjdk.org
Tue May 16 09:17:48 UTC 2023
On Mon, 15 May 2023 09:12:42 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.
Looks good!
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13980#pullrequestreview-1428115385
More information about the hotspot-compiler-dev
mailing list