changeset 57661:b42b794ac348

8235870: C2 crashes in IdealLoopTree::est_loop_flow_merge_sz() Reviewed-by: thartmann
author phedlin
date Mon, 13 Jan 2020 11:26:44 +0100
parents d50867368bac
children ab10165b4141
files src/hotspot/share/opto/loopnode.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/loopnode.cpp	Mon Jan 13 13:37:01 2020 +0100
+++ b/src/hotspot/share/opto/loopnode.cpp	Mon Jan 13 11:26:44 2020 +0100
@@ -2505,13 +2505,14 @@
 
     for (uint k = 0; k < outcnt; k++) {
       Node* out = node->raw_out(k);
-
+      if (out == NULL) continue;
       if (out->is_CFG()) {
         if (!is_member(_phase->get_loop(out))) {
           ctrl_edge_out_cnt++;
         }
-      } else {
+      } else if (_phase->has_ctrl(out)) {
         Node* ctrl = _phase->get_ctrl(out);
+        assert(ctrl != NULL, "must be");
         assert(ctrl->is_CFG(), "must be");
         if (!is_member(_phase->get_loop(ctrl))) {
           data_edge_out_cnt++;