--- old/src/hotspot/share/opto/phaseX.cpp 2020-01-17 17:14:39.249115648 +0100 +++ new/src/hotspot/share/opto/phaseX.cpp 2020-01-17 17:14:39.145115654 +0100 @@ -2106,6 +2106,10 @@ default: break; } + if (UseShenandoahGC) { + // TODO: Should we call this for ZGC as well? + BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn->_worklist, old); + } } }