Integrated: 8308084: C2 fix idom bug in PhaseIdealLoop::create_new_if_for_predicate

Emanuel Peter epeter at openjdk.org
Mon May 22 06:30:02 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.

This pull request has now been integrated.

Changeset: 41beb448
Author:    Emanuel Peter <epeter at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/41beb448d2ac5d432558f25362a787a9511a5d83
Stats:     15 lines in 1 file changed: 8 ins; 7 del; 0 mod

8308084: C2 fix idom bug in PhaseIdealLoop::create_new_if_for_predicate

Reviewed-by: chagedorn, thartmann, kvn

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

PR: https://git.openjdk.org/jdk/pull/13980


More information about the hotspot-compiler-dev mailing list