Skip to content

Commit 976127b

Browse files
committed
fix a bug when there are only IsdefinedUse
1 parent aedbbcd commit 976127b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

base/compiler/ssair/passes.jl

+6-2
Original file line numberDiff line numberDiff line change
@@ -917,8 +917,12 @@ function getuseidx(@nospecialize use)
917917
end
918918

919919
function compute_live_ins(cfg::CFG, fdu::FieldDefUse)
920-
uses = Int[getuseidx(use) for use in fdu.uses]
921-
compute_live_ins(cfg, fdu.defs, uses)
920+
uses = Int[]
921+
for use in fdu.uses
922+
isa(use, IsdefinedUse) && continue
923+
push!(uses, getuseidx(use))
924+
end
925+
return compute_live_ins(cfg, fdu.defs, uses)
922926
end
923927

924928
# even when the allocation contains an uninitialized field, we try an extra effort to check

0 commit comments

Comments
 (0)