--- old/src/hotspot/share/opto/compile.cpp 2018-11-08 19:38:58.246005738 +0100 +++ new/src/hotspot/share/opto/compile.cpp 2018-11-08 19:38:58.080007144 +0100 @@ -2793,6 +2793,17 @@ #endif // Count FPU ops and common calls, implements item (3) bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->final_graph_reshaping(this, n, nop); + if (!gc_handled) { + final_graph_reshaping_main_switch(n, frc, nop); + } + + // Collect CFG split points + if (n->is_MultiBranch() && !n->is_RangeCheck()) { + frc._tests.push(n); + } +} + +void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& frc, uint nop) { switch( nop ) { // Count all float operations that may use FPU case Op_AddF: @@ -2945,8 +2956,7 @@ handle_mem: #ifdef ASSERT if( VerifyOptoOopOffsets ) { - assert( n->is_Mem(), "" ); - MemNode *mem = (MemNode*)n; + MemNode* mem = n->as_Mem(); // Check to see if address types have grounded out somehow. const TypeInstPtr *tp = mem->in(MemNode::Address)->bottom_type()->isa_instptr(); assert( !tp || oop_offset_is_sane(tp), "" ); @@ -3464,18 +3474,11 @@ break; } default: - if (!gc_handled) { - assert(!n->is_Call(), ""); - assert(!n->is_Mem(), ""); - assert(nop != Op_ProfileBoolean, "should be eliminated during IGVN"); - } + assert(!n->is_Call(), ""); + assert(!n->is_Mem(), ""); + assert(nop != Op_ProfileBoolean, "should be eliminated during IGVN"); break; } - - // Collect CFG split points - if (n->is_MultiBranch() && !n->is_RangeCheck()) { - frc._tests.push(n); - } } //------------------------------final_graph_reshaping_walk---------------------