On Wed, 3 Jun 2026 16:23:42 GMT, Vladimir Kozlov <[email protected]> wrote:

>> Roland Westrelin has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/share/opto/escape.cpp line 4654:
> 
>> 4652:         // If the LoadFlat is mismatched, it's not removed so don't 
>> step over it if it's a flat access to the alias_idx
>> 4653:         // known instance
>> 4654:         if (!proj_in->as_LoadFlat()->is_mismatched() || 
>> !flat_access_aliases_with(proj_in, toop)) {
> 
> When it can be `mismatched`? Your whole comment above just confuse me.
> 
> What I see is in normal case (not mismatched) we always step over loads 
> regardless memory slice it is on. 
> In mismatching case we skip if it is on different memory slice. That is it.

It's `mismatched` when it comes from an unsafe call, for instance, if a flat 
field is read with unsafe at an offset that's not a constant so we don't really 
know what field is being read.

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

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

Reply via email to