Skip to content

Commit

Permalink
Fix embarassing bug on keepret (#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Nov 17, 2024
1 parent b63f36f commit 5e6a82d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,8 @@ function delete_writes_into_removed_args(fn::LLVM.Function, toremove, keepret::B
end
if !keepret && LLVM.API.LLVMIsAReturnInst(cur) != C_NULL
LLVM.API.LLVMSetOperand(cur, 0, LLVM.UndefValue(value_type(cval)))
end
continue
end
throw(AssertionError("Deleting argument with an unknown dependency, $(string(cur)) uses $(string(cval))"))
end
end
Expand Down

0 comments on commit 5e6a82d

Please sign in to comment.