Skip to content

Commit 0dacf3a

Browse files
committed
Remove a + 0
1 parent e8c303b commit 0dacf3a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/codegen/loopstartstopmanager.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,12 @@ function use_loop_induct_var!(
353353
loop = getloop(ls, ind)
354354
if usegespsymbol
355355
if isknown(first(loop))
356-
push!(gespinds.args, Expr(:call, GlobalRef(Base, :(+)), gespsymbol, staticexpr(gethint(first(loop)))))
356+
loopfirst = gethint(first(loop))
357+
if loopfirst == 0
358+
push!(gespinds.args, gespsymbol)
359+
else
360+
push!(gespinds.args, Expr(:call, GlobalRef(Base, :(+)), gespsymbol, staticexpr(loopfirst)))
361+
end
357362
else
358363
push!(gespinds.args, Expr(:call, GlobalRef(Base, :(+)), gespsymbol, getsym(first(loop))))
359364
end

0 commit comments

Comments
 (0)