Skip to content

Commit 0e2df68

Browse files
author
duke
committed
Backport 45c914c3ad8fbc406af9ba9dec97f11c28c91299
1 parent e57fbd4 commit 0e2df68

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,8 +1185,9 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
11851185
}
11861186
}
11871187
}
1188+
// Load barrier on the control output of a call
11881189
if ((ctrl->is_Proj() && ctrl->in(0)->is_CallJava()) || ctrl->is_CallJava()) {
1189-
CallNode* call = ctrl->is_Proj() ? ctrl->in(0)->as_CallJava() : ctrl->as_CallJava();
1190+
CallJavaNode* call = ctrl->is_Proj() ? ctrl->in(0)->as_CallJava() : ctrl->as_CallJava();
11901191
if (call->entry_point() == OptoRuntime::rethrow_stub()) {
11911192
// The rethrow call may have too many projections to be
11921193
// properly handled here. Given there's no reason for a
@@ -1222,6 +1223,14 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
12221223
CallProjections projs;
12231224
call->extract_projections(&projs, false, false);
12241225

1226+
// If this is a runtime call, it doesn't have an exception handling path
1227+
if (projs.fallthrough_catchproj == nullptr) {
1228+
assert(call->method() == nullptr, "should be runtime call");
1229+
assert(projs.catchall_catchproj == nullptr, "runtime call should not have catch all projection");
1230+
continue;
1231+
}
1232+
1233+
// Otherwise, clone the barrier so there's one for the fallthrough and one for the exception handling path
12251234
#ifdef ASSERT
12261235
VectorSet cloned;
12271236
#endif

0 commit comments

Comments
 (0)