Skip to content
Permalink
Browse files
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 a2bb4c601470a8f1d28ec2d869e5cb59d0a372e2
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
@@ -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();

1 comment on commit a2bb4c6

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on a2bb4c6 Oct 12, 2020

Please sign in to comment.