Skip to content

Commit 97d6e4a

Browse files
committed
8256046: Shenandoah: Mix-in NULL_PTR in non-strong ShLRBNode's type
Reviewed-by: roland, shade
1 parent a1d4b9f commit 97d6e4a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2945,7 +2945,12 @@ const Type* ShenandoahLoadReferenceBarrierNode::bottom_type() const {
29452945
if (t == TypePtr::NULL_PTR) {
29462946
return t;
29472947
}
2948-
return t->is_oopptr();
2948+
2949+
if (kind() == ShenandoahBarrierSet::AccessKind::NORMAL) {
2950+
return t;
2951+
}
2952+
2953+
return t->meet(TypePtr::NULL_PTR);
29492954
}
29502955

29512956
const Type* ShenandoahLoadReferenceBarrierNode::Value(PhaseGVN* phase) const {
@@ -2957,8 +2962,11 @@ const Type* ShenandoahLoadReferenceBarrierNode::Value(PhaseGVN* phase) const {
29572962
return t2;
29582963
}
29592964

2960-
const Type* type = t2->is_oopptr();
2961-
return type;
2965+
if (kind() == ShenandoahBarrierSet::AccessKind::NORMAL) {
2966+
return t2;
2967+
}
2968+
2969+
return t2->meet(TypePtr::NULL_PTR);
29622970
}
29632971

29642972
Node* ShenandoahLoadReferenceBarrierNode::Identity(PhaseGVN* phase) {

0 commit comments

Comments
 (0)