src/hotspot/share/opto/memnode.cpp
changeset 51078 fc6cfe40e32a
parent 50913 9816d7cc655e
child 51333 f6641fcf7b7e
--- a/src/hotspot/share/opto/memnode.cpp	Fri Jul 13 11:21:55 2018 +0800
+++ b/src/hotspot/share/opto/memnode.cpp	Thu Jul 12 16:31:28 2018 +0200
@@ -370,10 +370,10 @@
 
   if (mem != old_mem) {
     set_req(MemNode::Memory, mem);
-    if (can_reshape && old_mem->outcnt() == 0) {
-        igvn->_worklist.push(old_mem);
+    if (can_reshape && old_mem->outcnt() == 0 && igvn != NULL) {
+      igvn->_worklist.push(old_mem);
     }
-    if (phase->type( mem ) == Type::TOP) return NodeSentinel;
+    if (phase->type(mem) == Type::TOP) return NodeSentinel;
     return this;
   }
 
@@ -825,7 +825,7 @@
     }
     break;
   default:
-    // ShouldNotReachHere(); ???
+    ShouldNotReachHere();
     break;
   }
   assert(load != NULL, "LoadNode should have been created");