RFR: 8364757: Missing Store nodes caused by bad wiring in PhaseIdealLoop::insert_post_loop

Emanuel Peter epeter at openjdk.org
Tue Sep 16 09:14:53 UTC 2025


On Tue, 16 Sep 2025 08:58:18 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> I suppose we would trigger your assert if we found a branch:
>> `assert(unique_next == nullptr, "memory node should only have one usage in the loop body");`
>> 
>> Now we usually only do pre-main-post for relatively small loop bodies, see `LoopUnrollLimit`. But I wonder if we ever decided to increase this limit, would we then encounter such more complicated memory graphs?
>
> Ok, I think I have been misled by the names / comments.
> You are really looking for the last store in the `outer_loop`. And we do have the guarantee of a linear memory graph because it is the one between `if_false` and SafePoint.

I think a better method name would help a lot ;)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27225#discussion_r2351569804


More information about the hotspot-compiler-dev mailing list