From 8e546a3fe013f6872e2338ceeb025f39c864ee0c Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Fri, 25 Oct 2019 17:30:25 +0200 Subject: [PATCH] 8233021: Shenandoah: SBSC2::is_shenandoah_lrb_call should match all LRB shapes Reviewed-by: zgu --- .../share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp index d10440d0cc4..efdbf291f42 100644 --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp @@ -297,8 +297,15 @@ bool ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call(Node* call) { } bool ShenandoahBarrierSetC2::is_shenandoah_lrb_call(Node* call) { - return call->is_CallLeaf() && - call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier); + if (!call->is_CallLeaf()) { + return false; + } + + address entry_point = call->as_CallLeaf()->entry_point(); + return (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier)) || + (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_fixup)) || + (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_fixup_narrow)) || + (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native)); } bool ShenandoahBarrierSetC2::is_shenandoah_marking_if(PhaseTransform *phase, Node* n) {