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

Tobias Hartmann tobias.hartmann at oracle.com
Fri Dec 14 17:22:01 UTC 2018


please review the following change that adds a regression test for 8214994 [1]:

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:


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):

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.


[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