Skip to content

Commit 3751c0f

Browse files
authored
fwd_demand: Fix handling of SSAValue in stmt position (#138)
1 parent 0af8299 commit 3751c0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codegen/forward_demand.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function forward_diff_no_inf!(ir::IRCode, to_diff::Vector{Pair{SSAValue, Int}};
268268
# TODO: New PiNode that discriminates based on primal?
269269
inst[:inst] = maparg(stmt.val, SSAValue(ssa), order)
270270
inst[:type] = Any
271-
elseif isa(stmt, GlobalRef)
271+
elseif isa(stmt, GlobalRef) || isa(stmt, SSAValue)
272272
inst[:inst] = maparg(stmt, SSAValue(ssa), order)
273273
inst[:type] = Any
274274
elseif isa(stmt, Expr) || isa(stmt, PhiNode) || isa(stmt, PhiCNode) ||

0 commit comments

Comments
 (0)