--- old/src/hotspot/share/opto/graphKit.cpp 2020-01-17 17:08:44.153135216 +0100 +++ new/src/hotspot/share/opto/graphKit.cpp 2020-01-17 17:08:44.056135221 +0100 @@ -43,6 +43,10 @@ #include "opto/runtime.hpp" #include "runtime/deoptimization.hpp" #include "runtime/sharedRuntime.hpp" +#include "utilities/macros.hpp" +#if INCLUDE_SHENANDOAHGC +#include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp" +#endif //----------------------------GraphKit----------------------------------------- // Main utility constructor. @@ -3738,6 +3742,14 @@ if (ptr == NULL) { // reduce dumb test in callers return NULL; } + +#if INCLUDE_SHENANDOAHGC + if (UseShenandoahGC) { + BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2(); + ptr = bs->step_over_gc_barrier(ptr); + } +#endif + if (ptr->is_CheckCastPP()) { // strip only one raw-to-oop cast ptr = ptr->in(1); if (ptr == NULL) return NULL;