Skip to content

Commit 26bdd26

Browse files
committed
Accidentally redefined variable
1 parent 9d45ff7 commit 26bdd26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/transforms.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ function hoist_constant_store!(q::Expr, ls::LoopSet, op::Operation)
5454

5555
init = return_empty_reductinit(opr, name(opr)).instruction.instr
5656
pushpreamble!(ls, Expr(:(=), outer_reduct_init_typename(opr), Expr(:call, lv(:typeof), init)))
57-
q = Expr(:block)
58-
push!(q.args, Expr(:call, lv(:unsafe_store!), Expr(:call, lv(:pointer), op.ref.ptr), outer_reduction_to_scalar_reduceq!(q, opr, init)))
59-
length(q.args) == 0 || pushpreamble!(ls, q) # creating `Expr` and pushing because `outer_reduction_to_scalar_reduceq!` uses `pushfirst!(q.args`, and we don't want it at the start of the preamble
57+
qpre = Expr(:block)
58+
push!(q.args, Expr(:call, lv(:unsafe_store!), Expr(:call, lv(:pointer), op.ref.ptr), outer_reduction_to_scalar_reduceq!(qpre, opr, init)))
59+
length(qpre.args) == 0 || pushpreamble!(ls, qpre) # creating `Expr` and pushing because `outer_reduction_to_scalar_reduceq!` uses `pushfirst!(q.args`, and we don't want it at the start of the preamble
6060
return nothing
6161
end
6262

0 commit comments

Comments
 (0)