Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8254314: Shenandoah: null checks in c2 should not skip over native lo…
…ad barrier

Reviewed-by: rkennke
  • Loading branch information
rwestrel committed Oct 12, 2020
1 parent c73a0ff commit a2bb4c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
Expand Up @@ -1058,10 +1058,12 @@ Node* ShenandoahBarrierSetC2::ideal_node(PhaseGVN* phase, Node* n, bool can_resh
if (n->Opcode() == Op_CmpP) {
Node* in1 = n->in(1);
Node* in2 = n->in(2);
if (in1->bottom_type() == TypePtr::NULL_PTR) {
if (in1->bottom_type() == TypePtr::NULL_PTR &&
(in1->Opcode() != Op_ShenandoahLoadReferenceBarrier || !((ShenandoahLoadReferenceBarrierNode*)in1)->is_native())) {
in2 = step_over_gc_barrier(in2);
}
if (in2->bottom_type() == TypePtr::NULL_PTR) {
if (in2->bottom_type() == TypePtr::NULL_PTR &&
(in2->Opcode() != Op_ShenandoahLoadReferenceBarrier || !((ShenandoahLoadReferenceBarrierNode*)in2)->is_native())) {
in1 = step_over_gc_barrier(in1);
}
PhaseIterGVN* igvn = phase->is_IterGVN();
Expand Down

1 comment on commit a2bb4c6

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on a2bb4c6 Oct 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.