[14] RFR(S): 8228888: C2 compilation fails with assert "m has strange control"

Tobias Hartmann tobias.hartmann at oracle.com
Tue Aug 20 05:43:33 UTC 2019


Hi Vladimir,

thanks for the review!

Best regards,
Tobias

On 19.08.19 18:50, Vladimir Kozlov wrote:
> On 8/7/19 7:13 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8228888
>> http://cr.openjdk.java.net/~thartmann/8228888/webrev.00/
> 
> Good.
> 
>>
>> I found this while trying to write a regression test for another bug. The assert triggers when OSR
>> compiling an infinite loop with two back branches (see StrangeControl.jasm):
>> http://cr.openjdk.java.net/~thartmann/8228888/8228888_graph.png
>>
>> PhaseIdealLoop::has_local_phi_input() tries to determine if all inputs of n (118 Phi) are block
>> local phis. When looking at input m (108 StoreI), the assert fires because m is not a Phi and
>> control of m (102 IfFalse) does not dominate control of n (83 Region).
>>
>> I think the assert which was added by [1] is too strong. If n is a Phi itself, control of all its
>> inputs does not need to dominate its own control.
> 
> Correct - loops are examples.
> 
> Thanks,
> Vladimir
> 
>>
>> Thanks,
>> Tobias
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8187822
>>


More information about the hotspot-compiler-dev mailing list