RFR: 8362832: compiler/macronodes/TestTopInMacroElimination.java hits assert(false) failed: unexpected node [v2]
    Benoît Maillard 
    bmaillard at openjdk.org
       
    Mon Nov  3 17:17:36 UTC 2025
    
    
  
On Thu, 30 Oct 2025 12:27:21 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/hotspot/share/opto/macro.cpp
>>   
>>   Co-authored-by: Daniel Lundén <daniel.lunden at oracle.com>
>
> src/hotspot/share/opto/macro.cpp line 506:
> 
>> 504:     } else if (mem->is_top()) {
>> 505:       // The slice is on a dead path. Returning top prevents bailing out
>> 506:       // from the elimination, and IGVN can later clean up.
> 
> You could make it more specific, and say what you say in your PR description:
> `return nullptr` would lead to elimination bailout, but we want to prevent that. Just forwarding the `top` is also legal, and `IGVN` can just clean things up, and remove whatever receives top.
> 
> Does this mean that there could be paths that don't get `top`, and so for those paths it is nice that we are able to remove the allocation, right?
Done, thanks for the suggestion!
> Does this mean that there could be paths that don't get top, and so for those paths it is nice that we are able to remove the allocation, right?
Yes, exactly. We don't want a dead path to delay the removal of the allocation that would also have an effect on paths that are not dead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27903#discussion_r2487260068
    
    
More information about the hotspot-compiler-dev
mailing list