--- old/src/hotspot/share/opto/macro.cpp 2018-06-06 00:41:15.978071519 +0200 +++ new/src/hotspot/share/opto/macro.cpp 2018-06-06 00:41:15.723060538 +0200 @@ -2574,7 +2574,9 @@ assert(n->Opcode() == Op_LoopLimit || n->Opcode() == Op_Opaque1 || n->Opcode() == Op_Opaque2 || - n->Opcode() == Op_Opaque3, "unknown node type in macro list"); + n->Opcode() == Op_Opaque3 || + BarrierSet::barrier_set()->barrier_set_c2()->is_gc_barrier_node(n), + "unknown node type in macro list"); } assert(success == (C->macro_count() < old_macro_count), "elimination reduces macro count"); progress = progress || success; @@ -2656,7 +2658,7 @@ while (macro_idx >= 0) { Node * n = C->macro_node(macro_idx); assert(n->is_macro(), "only macro nodes expected here"); - if (_igvn.type(n) == Type::TOP || n->in(0)->is_top() ) { + if (_igvn.type(n) == Type::TOP || (n->in(0) != NULL && n->in(0)->is_top())) { // node is unreachable, so don't try to expand it C->remove_macro_node(n); } else if (n->is_ArrayCopy()){ @@ -2674,7 +2676,7 @@ int macro_count = C->macro_count(); Node * n = C->macro_node(macro_count-1); assert(n->is_macro(), "only macro nodes expected here"); - if (_igvn.type(n) == Type::TOP || n->in(0)->is_top() ) { + if (_igvn.type(n) == Type::TOP || (n->in(0) != NULL && n->in(0)->is_top())) { // node is unreachable, so don't try to expand it C->remove_macro_node(n); continue;