[lworld] RFR: 8301664: [lworld] Inconsistent CastPP type leads to infinite loop in PhaseIterGVN::optimize

Tobias Hartmann thartmann at openjdk.org
Tue Feb 7 14:38:17 UTC 2023


Cloning of CastPPs in `PhaseIdealLoop::flatten_array_element_type_check` does not update the bottom type of the CastPP, leading to a mismatch of `type()` and `adr_type()` of a `LoadNKlass` -> `AddP` -> `CastPP` user. As a result, the node is re-added to the IGVN worklist infinitely, assuming that type of the AddP will be updated:
https://github.com/openjdk/valhalla/blob/256f488b64846e4af2bfa90d436139bda8d0e7aa/src/hotspot/share/opto/memnode.cpp#L372-L374

Best regards,
Tobias

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

Commit messages:
 - 8301664: [lworld] Inconsistent CastPP type leads to infinite loop in PhaseIterGVN::optimize.

Changes: https://git.openjdk.org/valhalla/pull/822/files
 Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=822&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8301664
  Stats: 7 lines in 2 files changed: 2 ins; 4 del; 1 mod
  Patch: https://git.openjdk.org/valhalla/pull/822.diff
  Fetch: git fetch https://git.openjdk.org/valhalla pull/822/head:pull/822

PR: https://git.openjdk.org/valhalla/pull/822



More information about the valhalla-dev mailing list