--- old/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp 2018-03-16 09:52:24.261511588 +0100 +++ new/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp 2018-03-16 09:52:24.082503948 +0100 @@ -770,7 +770,7 @@ __ leal(LIR_OprFact::address(a), addr); if (type == objectType) { // Write-barrier needed for Object fields. - if (UseLoadBarrier) { + if (UseZGC) { // Load barrier to make sure that cas_obj() sees a correct oop. LIR_Opr pre_val = new_register(T_OBJECT); __ load(new LIR_Address(addr, as_BasicType(type)), pre_val); @@ -1619,7 +1619,7 @@ } else { LIR_Address* addr = new LIR_Address(src, offset, type); __ load(addr, dst); - if (type == T_OBJECT && UseLoadBarrier) { + if (type == T_OBJECT && UseZGC) { load_barrier(dst, LIR_OprFact::address(addr)); } } @@ -1700,7 +1700,7 @@ } __ xchg(LIR_OprFact::address(addr), dst, dst, LIR_OprFact::illegalOpr); if (is_obj) { - if (UseLoadBarrier) { + if (UseZGC) { load_barrier(dst); }