RFR: JDK-8322854: Incorrect rematerialization of scalar replaced objects in C2

Vladimir Kozlov kvn at openjdk.org
Fri Feb 2 23:35:00 UTC 2024


On Mon, 29 Jan 2024 18:45:37 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:

>> @JohnTortugo do I understand correctly that we have a loop and the Phi node we are processing is memory input to Allocation?
>> 
>> If I recall correctly, the only way we get to `alloc->in(Mem)` if there is no `Initialize` node  (there are such cases).  In such case `Allocation` may not have memory out projection.
>> 
>> Why your case see `alloc->in(Mem)`?  
>> 
>> What other `Phi` node's edge points to?
>> 
>> I am concern if you use projection memory edge of the Allocate you may miss/skip it during search and start searching unrelated path.
>
> @vnkozlov - Thank you for letting me know about those edge cases. I'll investigate what happens in those situations. 
> I created this Gist to demonstrate the problem: https://gist.github.com/JohnTortugo/2e6f183b0bf1e465dc871246b410ef4c
> 
> @TobiHartmann - I'll try and reproduce these failures locally.

@JohnTortugo are you still working on it? Please, let me know when you are ready for re-review and testing.

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

PR Comment: https://git.openjdk.org/jdk/pull/17562#issuecomment-1924903388


More information about the hotspot-compiler-dev mailing list