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

Emanuel Peter epeter at openjdk.org
Wed May 17 10:19:53 UTC 2023


> 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

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

Changes: https://git.openjdk.org/jdk/pull/13980/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13980&range=01
  Stats: 15 lines in 1 file changed: 8 ins; 7 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/13980.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13980/head:pull/13980

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


More information about the hotspot-compiler-dev mailing list