RFR: JDK-8316756: C2 EA fails with "missing memory path" when encountering unsafe_arraycopy stub call [v3]
Christian Hagedorn
chagedorn at openjdk.org
Tue Jan 16 17:53:24 UTC 2024
On Tue, 16 Jan 2024 17:02:55 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>>> Could we somehow assert here that we have a call with an intended narrow memory input? Directly asserting that this is an unsafe arraycopy might be too specific. But maybe we can add the following sanity check?
>>>
>>> ```
>>> n->as_CallLeaf()->adr_type()->is_rawptr()
>>> ```
>>
>> @vnkozlov what do you think?
>
> If it is not Narrow memory you will get `MergeMem` node as Call's memory input which we put on`mergemem_worklist` and not processing it or its users in this part of code. We have `assert(mergemem_worklist.contains(m->as_MergeMem())` instead here.
>
> You can add `assert(!n->in(TypeFunc::Memory)->as_MergeMem(), "only narrow memory expected here");` if you want.
Right, we could add this assert as well for expecting a narrow memory input in general. What are your thoughts about explicitly asserting for an unsafe arraycopy when visiting this call?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17347#discussion_r1453772091
More information about the hotspot-compiler-dev
mailing list