RFR: 8305073: Fix VerifyLoopOptimizations - step 2 - verify idom

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Mon May 15 07:45:45 UTC 2023


On Fri, 12 May 2023 09:09:06 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> This is the second step in the `VerifyLoopOptimizations` revival.
> 
> Last step:
> [JDK-8173709](https://bugs.openjdk.org/browse/JDK-8173709) Fix VerifyLoopOptimizations - step 1 - minimal infrastructure 
> See PR for all the planned steps: https://github.com/openjdk/jdk/pull/13207
> 
> Next step:
> [JDK-8307982](https://bugs.openjdk.org/browse/JDK-8307982) Fix VerifyLoopOptimizations - step 3 - fix ctrl/loop
> 
> -------
> 
> 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.

Hi Emanuel, thanks for your useful work in resurrecting `VerifyLoopOptimizations`!
I think the issue in `loopPredicate.cpp` should be reported (as a bug) and addressed separately, ideally (if feasible) with a corresponding test case.

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

PR Comment: https://git.openjdk.org/jdk/pull/13951#issuecomment-1547347108


More information about the hotspot-compiler-dev mailing list