diff --git a/src/hotspot/share/opto/loopopts.cpp b/src/hotspot/share/opto/loopopts.cpp index 3e5a649..f21a5e5 100644 --- a/src/hotspot/share/opto/loopopts.cpp +++ b/src/hotspot/share/opto/loopopts.cpp @@ -23,6 +23,8 @@ */ #include "precompiled.hpp" +#include "gc/shared/barrierSet.hpp" +#include "gc/shared/c2/barrierSetC2.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "opto/addnode.hpp" @@ -1375,6 +1377,9 @@ void PhaseIdealLoop::split_if_with_blocks_post(Node *n) { get_loop(get_ctrl(n)) == get_loop(get_ctrl(n->in(1))) ) { _igvn.replace_node( n, n->in(1) ); } + + BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2(); + bs->loop_optimize_gc_barrier(n); } //------------------------------split_if_with_blocks---------------------------