Skip to content

Commit

Permalink
fix a bug when there are only IsdefinedUse
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Jan 25, 2022
1 parent ce7dee2 commit 458073f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,12 @@ function getuseidx(@nospecialize use)
end

function compute_live_ins(cfg::CFG, fdu::FieldDefUse)
uses = Int[getuseidx(use) for use in fdu.uses]
compute_live_ins(cfg, fdu.defs, uses)
uses = Int[]
for use in fdu.uses
isa(use, IsdefinedUse) && continue
push!(uses, getuseidx(use))
end
return compute_live_ins(cfg, fdu.defs, uses)
end

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

0 comments on commit 458073f

Please sign in to comment.