RFR: 8351468: C2: array fill optimization assigns wrong type to intrinsic call

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Fri Mar 14 09:46:08 UTC 2025


On Thu, 13 Mar 2025 17:58:26 GMT, Galder Zamarreño <galder at openjdk.org> wrote:

> > ... explore creating a dedicated `StoreS` node in a separate RFE.
> 
> Why not do this in this PR? Seems like the right approach to me.

My thinking is that this is a bug whose fix we might want to backport to several JDK Update releases. The fix proposed in this PR is minimal and local to the array fill optimization, whereas the alternative approach of defining a `StoreS` node (see prototype [here](https://github.com/openjdk/jdk/compare/master...robcasloz:jdk:JDK-8351468-array-fill-optimization-new-store-node))
1) is more costly to apply due to its larger changeset, and
2) incurs a significantly higher risk of introducing regressions, as it affects the entire C2 compilation chain (for example, I found while prototyping it that it affects the output of the store merging optimization).

See [the OpenJDK Developers' Guide](https://openjdk.org/guide/#backporting) for a more elaborate discussion of the trade-offs involved in backporting.

Having said this, I still think we should consider introducing a `StoreS` node in a follow-up RFE, and perhaps also enforcing consistent type abbreviations across load and store node names, e.g. renaming `LoadUSNode` to `LoadCNode`.

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

PR Comment: https://git.openjdk.org/jdk/pull/24005#issuecomment-2724174002


More information about the hotspot-compiler-dev mailing list