RFR: 8370914: C2: Reimplement Type::join [v7]

Quan Anh Mai qamai at openjdk.org
Wed Jan 7 18:06:00 UTC 2026


On Wed, 7 Jan 2026 14:44:35 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains nine commits:
>> 
>>  - copyright year
>>  - Merge branch 'master' into typejoin
>>  - sort order
>>  - Merge branch 'master' into typejoin
>>  - Merge branch 'master' into typejoin
>>  - Move dual to ASSERT only
>>  - Keep old version for verification
>>  - whitespace
>>  - Reimplement Type::join
>
> src/hotspot/share/opto/memnode.cpp line 2019:
> 
>> 2017:   if (is_mismatched_access()) {
>> 2018:     return _type;
>> 2019:   }
> 
> How is that related to the reimplementation of join?

For mismatched accesses, the code below may perform `meet` and `join` of unrelated types, such as when we try to `LoadL` from a `byte[]`. The new `meet` and `join` forbid that, and the code below tries to reason about the value at a memory, which is impossible for mismatched accesses anyway.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28051#discussion_r2669543481


More information about the hotspot-compiler-dev mailing list