diff -r 670b4794f51e -r ddda023e6f66 src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp --- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Mon Jun 10 17:11:04 2019 -0700 +++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Tue Jun 11 09:27:51 2019 +0200 @@ -1356,6 +1356,14 @@ while(nodeStack.length() > 0) { Node *n = nodeStack.pop(); + for (uint i = 0; i < n->len(); i++) { + if (n->in(i)) { + if (!visited.test_set(n->in(i)->_idx)) { + nodeStack.push(n->in(i)); + } + } + } + bool is_old_node = (n->_idx < new_ids); // don't process nodes that were created during cleanup if (n->is_Load() && is_old_node) { LoadNode* load = n->isa_Load(); @@ -1364,14 +1372,6 @@ process_catch_cleanup_candidate(phase, load); } } - - for (uint i = 0; i < n->len(); i++) { - if (n->in(i)) { - if (!visited.test_set(n->in(i)->_idx)) { - nodeStack.push(n->in(i)); - } - } - } } C->print_method(PHASE_CALL_CATCH_CLEANUP, 2);