[jdk21u-dev] RFR: 8324517: C2: crash in compiled code because of dependency on removed range check CastIIs

Satyen Subramaniam ssubramaniam at openjdk.org
Tue Apr 22 16:47:57 UTC 2025


Backporting JDK-8324517: C2: crash in compiled code because of dependency on removed range check CastIIs. Fix adjusts code to retain range check CastII nodes after loop opts until the end of optimizations, removing them at the end of all optimizations to avoid performance regressions. Ran GHA Sanity Checks, local Tier 1 and 2, and new `test/hotspot/jtreg/compiler/rangechecks/TestArrayAccessAboveRCAfterRCCastIIEliminated.java` tests. Patch is clean.

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

Commit messages:
 - Backport ab8d7b0cedfaae124262325cd1d4b59cef996d85

Changes: https://git.openjdk.org/jdk21u-dev/pull/1691/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=1691&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8324517
  Stats: 562 lines in 6 files changed: 536 ins; 23 del; 3 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/1691.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/1691/head:pull/1691

PR: https://git.openjdk.org/jdk21u-dev/pull/1691


More information about the jdk-updates-dev mailing list