8233021: Shenandoah: SBSC2::is_shenandoah_lrb_call should match all LRB shapes
Reviewed-by: zgu
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp Fri Oct 25 07:15:09 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp Fri Oct 25 17:30:25 2019 +0200
@@ -297,8 +297,15 @@
}
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) {