[13] 8221592: C2 compilation failed with assert(!q->is_MergeMem())

Tobias Hartmann tobias.hartmann at oracle.com
Mon Apr 29 07:01:24 UTC 2019


Thanks Vladimir.

Best regards,
Tobias

On 26.04.19 18:31, Vladimir Kozlov wrote:
> Looks good.
> 
> Thanks,
> Vladimir
> 
> On 4/26/19 5:14 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8221592
>> http://cr.openjdk.java.net/~thartmann/8221592/webrev.00/
>>
>> We hit an assert during parsing with incremental inlining when merging memory edges into a target
>> block because of a MergeMem that has another MergeMem as input. I've traced the MergeMem back to
>> this code:
>> http://hg.openjdk.java.net/jdk/jdk/file/47a8fdf84424/src/hotspot/share/opto/parse1.cpp#l1028
>>
>> The memory input of the _exit map is a MergeMem with a useless Phi input that has another MergeMem
>> as input (see bug comments for details). After calling transform on this slice, the Phi is removed
>> and we end up with a MergeMem that is then set as input to the original MergeMem. This later
>> triggers the assert.
>>
>> The proposed fix is to transform the original MergeMem after transforming the slices to get rid of
>> MergeMem inputs.
>>
>> The problem only shows up with the fix for JDK-8059241 [1] which reduced the number of times
>> PhaseRemoveUseless is executed with incremental inlining. I don't think it's related though but just
>> triggers the bug.
>>
>> Tested with multiple runs of the microbenchmark that triggered the assert and
>> hs-tier1,hs-tier2,hs-tier3,hs-precheckin-comp,jdk-tier1,jdk-tier2,jdk-tier3 (running).
>>
>> Thanks,
>> Tobias
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8059241
>>


More information about the hotspot-compiler-dev mailing list