RFR: 8371804: C2: Tighten up LoadNode::Value comments after JDK-8346184

Aleksey Shipilev shade at openjdk.org
Thu Nov 13 14:38:36 UTC 2025


This confused me quite a bit in [JDK-8371581](https://bugs.openjdk.org/browse/JDK-8371581) investigations.

With [JDK-8346184](https://bugs.openjdk.org/browse/JDK-8346184), we have moved the block in `LoadNode::Value` that produced bottom values for the block that "If we are loading from a freshly-allocated object, produce a zero, if the load is provably beyond the header of the object." This comment is misleading, and really relates to the old place, which actually returns zeroes.

It would be better to clean this up to avoid further confusion. There should be no semantic change, only the cleanup.

Additional testing:
 - [ ] GHA

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/28296/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28296&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371804
  Stats: 15 lines in 1 file changed: 3 ins; 4 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/28296.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28296/head:pull/28296

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


More information about the hotspot-compiler-dev mailing list