8301874: BarrierSetC2 should assign barrier data to stores

Reviewed-by: rcastanedalo, kvn
This commit is contained in:
Erik Österlund 2023-02-14 09:18:48 +00:00
parent d782125c8f
commit 7f71a1040d

View File

@ -99,7 +99,8 @@ Node* BarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) cons
}
store = kit->store_to_memory(kit->control(), access.addr().node(), val.node(), bt,
access.addr().type(), mo, requires_atomic_access, unaligned, mismatched, unsafe);
access.addr().type(), mo, requires_atomic_access, unaligned,
mismatched, unsafe, access.barrier_data());
} else {
assert(access.is_opt_access(), "either parse or opt access");
C2OptAccess& opt_access = static_cast<C2OptAccess&>(access);
@ -117,6 +118,7 @@ Node* BarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) cons
if (mismatched) {
st->set_mismatched_access();
}
st->set_barrier_data(access.barrier_data());
store = gvn.transform(st);
if (store == st) {
mm->set_memory_at(alias, st);