On Tue, 2 Jun 2026 06:55:09 GMT, Roland Westrelin <[email protected]> wrote:

>> src/hotspot/share/opto/memnode.cpp line 326:
>> 
>>> 324:         assert(is_strict_final_load || is_known_instance, "tested 
>>> above");
>>> 325:         // LoadFlat and StoreFlat cannot happen to strict final fields
>>> 326:         // LoadFlat and StoreFlat to known instances are removed at 
>>> the end of EA: this one is unrelated
>> 
>> I asked a particular LLM about this, and it thinks there could be a problem 
>> here because a C2_MISMATCHED StoreFlat is not removed, and EA only marks the 
>> fields as global escape and not the based object.  Do you agree?
>
> A `StoreFlat` is not a regular `Store` so it can't be `C2_MISMATCHED`.

If that's the case then we can add assert to check that in the StoreFlatNode 
ctor, and remove the check for C2_MISMATCHED at the beginning of 
StoreFlatNode::expand_non_atomic.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2489#discussion_r3346373094

Reply via email to