Skip to content

Commit b36fe58

Browse files
committed
inlining: allow non-compileable result when handling ConcreteResult
In rare cases, the system might decide to widen the signature of a call that is determined to throw by concrete-evaluation. We should remove this unnecessary assertion here. closes #49050
1 parent ceffaee commit b36fe58

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

base/compiler/ssair/inlining.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,7 @@ end
14941494

14951495
function handle_concrete_result!(cases::Vector{InliningCase}, result::ConcreteResult, @nospecialize(info::CallInfo), state::InliningState)
14961496
case = concrete_result_item(result, info, state)
1497+
case === nothing && return false
14971498
push!(cases, InliningCase(result.mi.specTypes, case))
14981499
return true
14991500
end
@@ -1505,10 +1506,8 @@ function concrete_result_item(result::ConcreteResult, @nospecialize(info::CallIn
15051506
invokesig::Union{Nothing,Vector{Any}}=nothing)
15061507
if !may_inline_concrete_result(result)
15071508
et = InliningEdgeTracker(state.et, invokesig)
1508-
case = compileable_specialization(result.mi, result.effects, et, info;
1509+
return compileable_specialization(result.mi, result.effects, et, info;
15091510
compilesig_invokes=OptimizationParams(state.interp).compilesig_invokes)
1510-
@assert case !== nothing "concrete evaluation should never happen for uncompileable callsite"
1511-
return case
15121511
end
15131512
@assert result.effects === EFFECTS_TOTAL
15141513
return ConstantCase(quoted(result.result))

0 commit comments

Comments
 (0)