Skip to content

Commit

Permalink
8256046: Shenandoah: Mix-in NULL_PTR in non-strong ShLRBNode's type
Browse files Browse the repository at this point in the history
Reviewed-by: roland, shade
  • Loading branch information
rkennke committed Nov 10, 2020
1 parent a1d4b9f commit 97d6e4a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2945,7 +2945,12 @@ const Type* ShenandoahLoadReferenceBarrierNode::bottom_type() const {
if (t == TypePtr::NULL_PTR) {
return t;
}
return t->is_oopptr();

if (kind() == ShenandoahBarrierSet::AccessKind::NORMAL) {
return t;
}

return t->meet(TypePtr::NULL_PTR);
}

const Type* ShenandoahLoadReferenceBarrierNode::Value(PhaseGVN* phase) const {
Expand All @@ -2957,8 +2962,11 @@ const Type* ShenandoahLoadReferenceBarrierNode::Value(PhaseGVN* phase) const {
return t2;
}

const Type* type = t2->is_oopptr();
return type;
if (kind() == ShenandoahBarrierSet::AccessKind::NORMAL) {
return t2;
}

return t2->meet(TypePtr::NULL_PTR);
}

Node* ShenandoahLoadReferenceBarrierNode::Identity(PhaseGVN* phase) {
Expand Down

0 comments on commit 97d6e4a

Please sign in to comment.