8222738: Shenandoah: assert(is_Proj()) failed when running cometd benchmarks
authorroland
Thu, 02 May 2019 20:47:23 +0200
changeset 54738 26748009f2e5
parent 54737 0d35df96db33
child 54739 0dcb89221c93
8222738: Shenandoah: assert(is_Proj()) failed when running cometd benchmarks Reviewed-by: rkennke
src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp	Mon May 06 13:51:02 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp	Thu May 02 20:47:23 2019 +0200
@@ -1333,8 +1333,8 @@
         }
       }
     }
-    if (ctrl->is_Proj() && ctrl->in(0)->is_CallJava()) {
-      CallNode* call = ctrl->in(0)->as_CallJava();
+    if ((ctrl->is_Proj() && ctrl->in(0)->is_CallJava()) || ctrl->is_CallJava()) {
+      CallNode* call = ctrl->is_Proj() ? ctrl->in(0)->as_CallJava() : ctrl->as_CallJava();
       CallProjections projs;
       call->extract_projections(&projs, false, false);
 
@@ -1362,7 +1362,7 @@
         if (idx < n->outcnt()) {
           Node* u = n->raw_out(idx);
           Node* c = phase->ctrl_or_self(u);
-          if (c == ctrl) {
+          if (phase->is_dominator(call, c) && phase->is_dominator(c, projs.fallthrough_proj)) {
             stack.set_index(idx+1);
             assert(!u->is_CFG(), "");
             stack.push(u, 0);
@@ -1404,14 +1404,11 @@
             }
           }
         } else {
-          // assert(n_clone->outcnt() > 0, "");
-          // assert(n->outcnt() > 0, "");
           stack.pop();
           clones.pop();
         }
       } while (stack.size() > 0);
       assert(stack.size() == 0 && clones.size() == 0, "");
-      ctrl = projs.fallthrough_catchproj;
     }
   }