RFR: 8340532: C2: assert(is_OuterStripMinedLoop()) failed: invalid node class: IfTrue

Roland Westrelin roland at openjdk.org
Thu Nov 7 14:48:00 UTC 2024


A `CountedLoopEnd` (that marks the end of a still existing
`CountedLoop`) is optimized out because a dominating identical
`CountedLoopEnd` (that no longer marks the end of an existing
`CountedLoop` but was left behind by previous loop opts) is
found. That causes the path out of `CountedLoopEnd` to become dead
including the `OuterStripMinedLoopEnd`. The `OuterStripMinedLoop`
looses its backedge as a consequence. The `CountedLoop` is still
marked as strip mined but the outer loop doesn't exist anymore.

The fix I propose for this corner case is to simply detect when that
happens (during igvn AFAICT) and clear the strip mined flag from the
`CountedLoop`.

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

Commit messages:
 - fix & test

Changes: https://git.openjdk.org/jdk/pull/21956/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21956&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8340532
  Stats: 75 lines in 3 files changed: 74 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/21956.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21956/head:pull/21956

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


More information about the hotspot-compiler-dev mailing list