Skip to content

Commit 9e04378

Browse files
authored
Merge pull request #176 from JuliaDiff/sf/ignore_boundscheck_exprs
Ignore `:boundscheck` and `:code_coverage_effect` IR nodes
2 parents cab3a49 + 801ff96 commit 9e04378

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/codegen/forward.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ function fwd_transform!(ci, mi, nargs, N)
5353
return ZeroBundle{N}(mi.sparam_vals[stmt.args[1]::Int])
5454
elseif isexpr(stmt, :foreigncall)
5555
return Expr(:call, error, "Attempted to AD a foreigncall. Missing rule?")
56-
elseif isexpr(stmt, :meta) || isexpr(stmt, :inbounds) || isexpr(stmt, :loopinfo)
56+
elseif isexpr(stmt, :meta) || isexpr(stmt, :inbounds) || isexpr(stmt, :loopinfo) ||
57+
isexpr(stmt, :boundscheck) || isexpr(stmt, :code_coverage_effect)
5758
# Can't trust that meta annotations are still valid in the AD'd
5859
# version.
5960
return nothing

0 commit comments

Comments
 (0)