[12] RFR(S): 8215410: Regression test for JDK-8214994

Tobias Hartmann tobias.hartmann at oracle.com
Mon Dec 17 06:58:16 UTC 2018


Thanks Vladimir.

Best regards,
Tobias

On 14.12.18 19:24, Vladimir Kozlov wrote:
> Looks good.
> 
> Thanks,
> Vladimir
> 
> On 12/14/18 9:22 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following change that adds a regression test for 8214994 [1]:
>> https://bugs.openjdk.java.net/browse/JDK-8215410
>> http://cr.openjdk.java.net/~thartmann/8215410/webrev.00/
>>
>> The inner loop of test1 is found to be a counted loop and a loop limit check is added by updating
>> the Opaque1 input of the predicate template:
>>
>>   Predicate-If(Conv2B(Opaque1(Bool(CmpI(Phi(..))))))
>>
>> where the inner Phi represents the value of 'limit'. This Opaque1 node is then pushed upwards to
>> before the predicates of the outer loop and ends up right after the second 'if (b)'. The code that
>> does this was introduced by 8205515 [2] in JDK 11 b21 (which was a fix on top of 8203197):
>> http://hg.openjdk.java.net/jdk/jdk/file/339d2fbe8675/src/hotspot/share/opto/loopnode.cpp#l4307
>>
>> Then the split-if optimization kicks in and splits the first predicate of the outer loop (which is
>> an "obj != NULL" check) through the 'if (b)' region. We fail because the region contains an
>> unexpected Opaque1 node.
>>
>> After a long discussion with Roland, I came to the conclusion that this bug was fixed by accident
>> with JDK-8211451 [3] in JDK 12 b21. With the fix, loop limit checks no longer update the input of
>> the Opaque1 node but insert a new predicate. I've therefore closed [1] as duplicate of [3] which
>> should also be backported to JDK 11 and would like to integrate the regression test with this patch.
>>
>> Thanks,
>> Tobias
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8214994
>> [2] https://bugs.openjdk.java.net/browse/JDK-8205515
>> [3] https://bugs.openjdk.java.net/browse/JDK-8211451
>>


More information about the hotspot-compiler-dev mailing list