--- old/src/hotspot/share/opto/memnode.cpp 2020-01-17 17:14:37.423115749 +0100 +++ new/src/hotspot/share/opto/memnode.cpp 2020-01-17 17:14:37.322115755 +0100 @@ -52,6 +52,9 @@ #if INCLUDE_ZGC #include "gc/z/c2/zBarrierSetC2.hpp" #endif +#if INCLUDE_SHENANDOAHGC +#include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp" +#endif // Portions of code courtesy of Clifford Click @@ -1112,6 +1115,11 @@ (tp != NULL) && tp->is_ptr_to_boxed_value()) { intptr_t ignore = 0; Node* base = AddPNode::Ideal_base_and_offset(ld_adr, phase, ignore); +#if INCLUDE_SHENANDOAHGC + if (UseShenandoahGC) { + base = ((ShenandoahBarrierSetC2*) BarrierSet::barrier_set()->barrier_set_c2())->step_over_gc_barrier(base); + } +#endif if (base != NULL && base->is_Proj() && base->as_Proj()->_con == TypeFunc::Parms && base->in(0)->is_CallStaticJava() &&