Skip to content

Commit 458073f

Browse files
committed
fix a bug when there are only IsdefinedUse
1 parent ce7dee2 commit 458073f

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
@@ -912,8 +912,12 @@ function getuseidx(@nospecialize use)
912912
end
913913

914914
function compute_live_ins(cfg::CFG, fdu::FieldDefUse)
915-
uses = Int[getuseidx(use) for use in fdu.uses]
916-
compute_live_ins(cfg, fdu.defs, uses)
915+
uses = Int[]
916+
for use in fdu.uses
917+
isa(use, IsdefinedUse) && continue
918+
push!(uses, getuseidx(use))
919+
end
920+
return compute_live_ins(cfg, fdu.defs, uses)
917921
end
918922

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

0 commit comments

Comments
 (0)