On Fri, 29 May 2026 14:00:42 GMT, Roland Westrelin <[email protected]> wrote:
> The bug is caused by a mismatch in the way `LoadFlat` and `StoreFlat` > are handled in `ConnectionGraph::find_inst_mem()` and > `MemNode::optimize_simple_memory_chain()`. Once EA has run a first > time, found some value array allocations as non escaping, and removed > their `LoadFlat`/`StoreFlat`, igvn runs and is able to further > transform the memory subgraph which introduces inconsistencies that > are then caught the next time EA runs. > > The fix tries to make sure `ConnectionGraph::find_inst_mem()` and > `MemNode::optimize_simple_memory_chain()` handle `LoadFlat` and > `StoreFlat` similarly. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 9c7f8e50 Author: Roland Westrelin <[email protected]> URL: https://git.openjdk.org/valhalla/commit/9c7f8e50050daba85d645d7de4c973b15648a3fd Stats: 188 lines in 8 files changed: 185 ins; 0 del; 3 mod 8385328: [lworld] C2: assert(phi->_idx >= nodes_size()) failed: only new Phi per instance memory slice still happens after JDK-8374742 Reviewed-by: thartmann, dlong ------------- PR: https://git.openjdk.org/valhalla/pull/2489
