Skip to content

Commit e5ddbf2

Browse files
committed
lower stores u1 & !u2 stores
1 parent 08fef61 commit e5ddbf2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/codegen/lowering.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function lower_block(
7070
lower!(blockq, opsv1, ls, unrollsyms, u₁, u₂, t, mask & !(dontmaskfirsttiles & (t < u₂ - 1)), lowernonstore, lowerstore)
7171
if iszero(t) && !store # u₁ && !u₂
7272
# for u ∈ 0:u₁-1
73-
lower!(blockq, ops[2,1,prepost,n], ls, unrollsyms, u₁, u₂, -1, mask, lowernonstore, lowerstore)
73+
lower!(blockq, ops[2,1,prepost,n], ls, unrollsyms, u₁, u₂, -1, mask, true, true)
7474
# end
7575
end
7676
# u₁ && u₂
@@ -504,7 +504,6 @@ function initialize_outer_reductions!(
504504
u₁u, u₂u = isunrolled_sym(op, getloop(ls, us.u₁loopnum).itersymbol, getloop(ls, us.u₂loopnum).itersymbol, getloop(ls, us.vloopnum).itersymbol, ls)#, u₂)
505505
z = outer_reduction_zero(op, u₁u, Umax, reduction_instruction_class(instruction(op)), rs)
506506
mvar = variable_name(op, -1)
507-
# @show u₁, u₂, u₁u, _Umax
508507
if (u₂ == -1)
509508
push!(q.args, Expr(:(=), Symbol(mvar, '_', _Umax), z))
510509
elseif u₁u
@@ -549,7 +548,6 @@ function add_upper_outer_reductions(ls::LoopSet, loopq::Expr, Ulow::Int, Uhigh::
549548
ifq = Expr(:block)
550549
ifqlet = Expr(:block)
551550
initialize_outer_reductions!(ifqlet, ls, Uhigh)
552-
# @show loopq
553551
push!(ifq.args, loopq)
554552
t = Expr(:tuple)
555553
mvartu = Expr(:tuple)
@@ -738,7 +736,6 @@ end
738736
maskexpr(looplimit) = Expr(:(=), MASKSYMBOL, Expr(:call, lv(:mask), VECTORWIDTHSYMBOL, looplimit))
739737
@inline idiv_fast(a::I, b::I) where {I <: Base.BitInteger} = Base.udiv_int(a, b)
740738
@inline idiv_fast(a, b) = idiv_fast(Int(a), Int(b))
741-
# @inline idiv_fast(a, b) = idiv_fast(@show(Int(a)), @show(Int(b)))
742739
function definemask(loop::Loop)
743740
isstaticloop(loop) && return maskexpr(length(loop))
744741
# W = 4
@@ -863,7 +860,6 @@ ureduct(ls::LoopSet) = ls.ureduct
863860
function lower_unrollspec(ls::LoopSet)
864861
us = ls.unrollspecification
865862
@unpack vloopnum, u₁, u₂ = us
866-
# @show u₁, u₂
867863
order = names(ls)
868864
init_loop_map!(ls)
869865
vectorized = order[vloopnum]
@@ -955,7 +951,6 @@ function isunrolled_sym(
955951
u₁reduced = u₁loop reductops
956952
u₂reduced = u₂loop reductops
957953
# If they're being reduced, we want to only unroll the reduced variable along one of the two loops.
958-
# @show u₁reduced, u₂reduced
959954
if u₂reduced
960955
if u₁reduced# if both are reduced, we unroll u₁
961956
if vloop === u₁loop

0 commit comments

Comments
 (0)