RFR(S): 8205515: assert(opcode == Op_RangeCheck) failed: no other if variant here

Roland Westrelin rwestrel at redhat.com
Mon Jul 2 08:44:12 UTC 2018


> Tobias already started testing and I see new crashes. It was Kitchensink 
> test running with ZGC.

I managed to reproduce it. New webrev:

http://cr.openjdk.java.net/~roland/8205515/webrev.02/

change from previous webrev:

diff --git a/src/hotspot/share/opto/loopPredicate.cpp b/src/hotspot/share/opto/loopPredicate.cpp
--- a/src/hotspot/share/opto/loopPredicate.cpp
+++ b/src/hotspot/share/opto/loopPredicate.cpp
@@ -1283,7 +1283,7 @@
     Node* n = skip_loop_predicates(entry);
     // Check if predicates were already added to the profile predicate
     // block
-    if (n != entry->in(0)->in(0)) {
+    if (n != entry->in(0)->in(0) || n->outcnt() != 1) {
       has_profile_predicates = true;
     }
     entry = n;

Once we have started adding predicates as profile predicates we can't
add regular predicates because 2 predicates can be dependent through a
data node. To guarantee that, the loop predication checks for no profile
predicates. In my previous email, I described how we could end up with:

  predicate added at parse time (with Opaque1 node)

  some data node

  profile predicate added at parse time (with Opaque1 node)

With that pattern, the check for no profile predicates succeeds, new
regular predicates are allowed and some predicate that dependent on the
data node can be hoisted above the data node.

Roland.


More information about the hotspot-compiler-dev mailing list