RFR: 8313262: C2: Sinking node may cause required cast to be dropped

Roland Westrelin roland at openjdk.org
Tue Aug 22 07:36:57 UTC 2023


When a node is sunk out of a loop a cast node is created to pin the
node out of the loop. When a chain of nodes is sunk, we don't want a
cast node per node in the chain but rather one to pin the last of the
chain. So the logic for sinking nodes looks for unneeded cast
nodes. The test for what makes a cast unneeded is incorrect and causes
a cast to not null to be wrongly removed.

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

Commit messages:
 - test
 - fix

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

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


More information about the hotspot-compiler-dev mailing list