RFR(S): 8187822: C2 conditonal move optimization might create broken graph

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Sep 28 18:04:42 UTC 2017


Yes, this version is better.

My only concern now if there is a case when data node has control edge pointing to branch of diamond and depends on If's condition (NULL check). Can this happen?

Thanks,
Vladimir

On 9/27/17 7:48 AM, Roland Westrelin wrote:
> 
> Hi Vladimir,
> 
> Thanks for looking at this.
> 
>> But as I understand we can't replace such diamond code with cmove
>> because If node will not be eliminated if you not adjust control of
>> LoadI node.
> 
> The LoadI node has no control input but it's only used by the AddI which
> is only used by the Phi of the diamond. PhaseIdealLoop schedules it as
> late as possible, that is in the branch of the diamond.
> 
> The fix I sent for review was actually broken (the controls of the inputs
> of the CMoveX wouldn't dominate the control of the CMoveX). What about
> this instead:
> 
> http://cr.openjdk.java.net/~roland/8187822/webrev.01/
> 
> which simply follows dependent data nodes if needed and adjust their
> control.
> 
> Roland.
> 


More information about the hotspot-compiler-dev mailing list