Skip to content

Commit

Permalink
Second phi embarassing bugfix (#1245)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Jan 24, 2024
1 parent 0c9f0df commit 74935a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,20 @@ function nodecayed_phis!(mod::LLVM.Module)
if addr == 11
all_args = true
addrtodo = Value[inst]
seen = Set{LLVM.Value}()

while length(addrtodo) != 0
v = pop!(addrtodo)
base = get_base_object(v)
seen = Set{LLVM.Value}()
if in(base, seen)
continue
end
push!(seen, base)
if isa(base, LLVM.Argument) && addrspace(value_type(base)) == 11
continue
end
if isa(v, LLVM.PHIInst)
for (v, _) in LLVM.incoming(inst)
if isa(base, LLVM.PHIInst)
for (v, _) in LLVM.incoming(base)
push!(addrtodo, v)
end
continue
Expand Down

0 comments on commit 74935a3

Please sign in to comment.