Skip to content

Commit

Permalink
Don't bother rewriting known calls (#1550)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jun 21, 2024
1 parent d10c708 commit cfc1470
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,16 @@ function rewrite_union_returns_as_ref(enzymefn::LLVM.Function, off, world, width
push!(todo, (cur[off[1]], off[2:end]))
continue
end

if isa(cur, LLVM.CallInst)
dest = called_operand(cur)
if isa(dest, LLVM.Function)
fn = LLVM.name(dest)
if fn == "julia.call" || fn == "julia.call2"
continue
end
end
end

msg = sprint() do io::IO
println(io, "Enzyme Internal Error (rewrite_union_returns_as_ref[2])")
Expand Down

0 comments on commit cfc1470

Please sign in to comment.