Skip to content

Commit f5c0240

Browse files
committed
inlining: fix the joint_effects calculation (#50117)
There are cases when `joint_effects` already has `:nothrow` tainted while the matches are fully covered.
1 parent 708c56a commit f5c0240

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,11 +2441,9 @@ function abstract_eval_globalref(interp::AbstractInterpreter, g::GlobalRef, fram
24412441
nothrow = false
24422442
if isa(rt, Const)
24432443
consistent = ALWAYS_TRUE
2444+
nothrow = true
24442445
if is_mutation_free_argtype(rt)
24452446
inaccessiblememonly = ALWAYS_TRUE
2446-
nothrow = true
2447-
else
2448-
nothrow = true
24492447
end
24502448
elseif isdefined_globalref(g)
24512449
nothrow = true

base/compiler/ssair/inlining.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ function compute_inlining_cases(@nospecialize(info::CallInfo), flag::UInt8, sig:
14011401
fully_covered &= split_fully_covered
14021402
end
14031403

1404-
joint_effects = Effects(joint_effects; nothrow=fully_covered)
1404+
fully_covered || (joint_effects = Effects(joint_effects; nothrow=false))
14051405

14061406
if handled_all_cases && revisit_idx !== nothing
14071407
# we handled everything except one match with unmatched sparams,

0 commit comments

Comments
 (0)