8227083: ZGC: C2: Generates on_weak barrier for WeakCompareAndSwap

Reviewed-by: neliasso, eosterlund
This commit is contained in:
Stefan Karlsson 2019-07-02 12:24:26 +02:00
parent 70b0862972
commit e632ccd508

View File

@ -1234,7 +1234,6 @@ static void insert_barrier_before_unsafe(PhaseIdealLoop* phase, LoadStoreNode* o
Compile *C = phase->C;
PhaseIterGVN &igvn = phase->igvn();
LoadStoreNode* zclone = NULL;
bool is_weak = false;
Node *in_ctrl = old_node->in(MemNode::Control);
Node *in_mem = old_node->in(MemNode::Memory);
@ -1254,7 +1253,6 @@ static void insert_barrier_before_unsafe(PhaseIdealLoop* phase, LoadStoreNode* o
if (can_simplify_cas(old_node)) {
break;
}
is_weak = true;
zclone = new ZWeakCompareAndSwapPNode(in_ctrl, in_mem, in_adr, in_val, old_node->in(LoadStoreConditionalNode::ExpectedIn),
((CompareAndSwapNode*)old_node)->order());
adr_type = TypePtr::BOTTOM;
@ -1285,7 +1283,7 @@ static void insert_barrier_before_unsafe(PhaseIdealLoop* phase, LoadStoreNode* o
igvn.register_new_node_with_optimizer(load);
igvn.replace_node(old_node, zclone);
Node *barrier = new LoadBarrierNode(C, NULL, in_mem, load, in_adr, is_weak);
Node *barrier = new LoadBarrierNode(C, NULL, in_mem, load, in_adr, false /* weak */);
Node *barrier_val = new ProjNode(barrier, LoadBarrierNode::Oop);
Node *barrier_ctrl = new ProjNode(barrier, LoadBarrierNode::Control);