Skip to content

Commit c8e44d3

Browse files
committed
Check whether prefetched load is unrolled. Fixes #225.
1 parent 05a8124 commit c8e44d3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/codegen/lower_load.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function add_prefetches!(q::Expr, ls::LoopSet, op::Operation, td::UnrollArgs, pr
8181
(ind == u₁loopsym) && (i = j)
8282
end
8383
push!(q.args, Expr(:call, lv(:prefetch0), gptr, copy(inds)))
84+
i == 0 && return
8485
for u 1:u₁-1
8586
# for u ∈ umin:min(umin,U-1)
8687
# (u₁loopsym === vloopsym && !iszero(u & dontskip)) && continue

src/reconstruct_loopset.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ Execute an `@avx` block. The block's code is represented via the arguments:
623623
@generated function _avx_!(
624624
::Val{UNROLL}, ::Val{OPS}, ::Val{ARF}, ::Val{AM}, ::Val{LPSYM}, var"#lv#tuple#args#"::Tuple{LB,V}
625625
) where {UNROLL, OPS, ARF, AM, LPSYM, LB, V}
626-
# 1 + 1 # Irrelevant line you can comment out/in to force recompilation...
626+
1 + 1 # Irrelevant line you can comment out/in to force recompilation...
627627
ls = _avx_loopset(OPS, ARF, AM, LPSYM, LB.parameters, V.parameters, UNROLL)
628628
# return @show avx_body(ls, UNROLL)
629629
if last(UNROLL) > 1

0 commit comments

Comments
 (0)