@@ -83,8 +83,7 @@ function val_for_def_expr(ir::IRCode, def::Int, fidx::Int)
83
83
if isexpr (ex, :new )
84
84
return ex. args[1 + fidx]
85
85
else
86
- @assert isa (ex, Expr)
87
- # The use is whatever the setfield was
86
+ @assert is_known_call (ex, setfield!, ir)
88
87
return ex. args[4 ]
89
88
end
90
89
end
@@ -939,7 +938,7 @@ function pattern_match_typeof(compact::IncrementalCompact, typ::DataType, fidx::
939
938
push! (tvars, applyTvar)
940
939
end
941
940
942
- applyT. name === typ. name || return false
941
+ @assert applyT. name === typ. name
943
942
fT = fieldtype (applyT, fidx)
944
943
idx = findfirst (IsEgal (fT), tvars)
945
944
idx === nothing && return false
@@ -1106,15 +1105,14 @@ function sroa_pass!(ir::IRCode, inlining::Union{Nothing,InliningState}=nothing)
1106
1105
val = stmt. args[2 ]
1107
1106
end
1108
1107
struct_typ = widenconst (argextype (val, compact))
1109
- struct_typ_name = argument_datatype (struct_typ)
1110
- if struct_typ_name === nothing
1108
+ struct_argtyp = argument_datatype (struct_typ)
1109
+ if struct_argtyp === nothing
1111
1110
if isa (struct_typ, Union)
1112
1111
lift_comparison! (isdefined, compact, idx, stmt, lifting_cache, 𝕃ₒ)
1113
1112
end
1114
1113
continue
1115
- else
1116
- struct_typ_name = struct_typ_name. name
1117
1114
end
1115
+ struct_typ_name = struct_argtyp. name
1118
1116
1119
1117
struct_typ_name. atomicfields == C_NULL || continue # TODO : handle more
1120
1118
if ! ((field_ordering === :unspecified ) ||
0 commit comments