RFR: 8373343: C2: verify AddP base input only set for heap addresses
Roland Westrelin
roland at openjdk.org
Mon Dec 15 15:17:47 UTC 2025
On Fri, 12 Dec 2025 23:45:16 GMT, Dean Long <dlong at openjdk.org> wrote:
>> The base input of `AddP` is expected to only be set for heap accesses
>> but I noticed some inconsistencies so I added an assert in the `AddP`
>> constructor and fixed issues that it caught. AFAFICT, the
>> inconsistencies shouldn't create issues.
>
> src/hotspot/share/opto/memnode.cpp line 4126:
>
>> 4124: Node* base = dest;
>> 4125: if (phase->type(dest)->isa_oopptr() == nullptr) {
>> 4126: base = phase->C->top();
>
> How is this possible? Aren't all arrays in the heap?
`isa_oopptr()` is non null for all oops, array and instance.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28769#discussion_r2619838306
More information about the hotspot-compiler-dev
mailing list