@@ -679,9 +679,9 @@ function pointermax_index(
679
679
else
680
680
_ind = if isvectorized
681
681
if isone (sub)
682
- Expr (:call , lv (:vsub_fast ), staticexpr (stophint), VECTORWIDTHSYMBOL)
682
+ Expr (:call , lv (:vsub_nsw ), staticexpr (stophint), VECTORWIDTHSYMBOL)
683
683
else
684
- Expr (:call , lv (:vsub_fast ), staticexpr (stophint), mulexpr (VECTORWIDTHSYMBOL, sub))
684
+ Expr (:call , lv (:vsub_nsw ), staticexpr (stophint), mulexpr (VECTORWIDTHSYMBOL, sub))
685
685
end
686
686
else
687
687
staticexpr (stophint - sub)
@@ -717,9 +717,9 @@ function pointermax_index(ls::LoopSet, ar::ArrayReferenceMeta, n::Int, sub::Int,
717
717
else
718
718
_ind = if isvectorized
719
719
if isone (sub)
720
- Expr (:call , lv (:vsub_fast ), stopsym, VECTORWIDTHSYMBOL)
720
+ Expr (:call , lv (:vsub_nsw ), stopsym, VECTORWIDTHSYMBOL)
721
721
else
722
- Expr (:call , lv (:vsub_fast ), stopsym, mulexpr (VECTORWIDTHSYMBOL, sub))
722
+ Expr (:call , lv (:vsub_nsw ), stopsym, mulexpr (VECTORWIDTHSYMBOL, sub))
723
723
end
724
724
else
725
725
subexpr (stopsym, sub)
@@ -817,25 +817,26 @@ function maxunroll(us::UnrollSpecification, n)
817
817
end
818
818
819
819
820
- function startloop (ls:: LoopSet , us:: UnrollSpecification , n:: Int , submax = maxunroll (us, n))
821
- @unpack u₁loopnum, u₂loopnum, vloopnum, u₁, u₂ = us
822
- lssm = ls. lssm
823
- termind = lssm. terminators[n]
824
- ptrdefs = lssm. incrementedptrs[n]
825
- loopstart = Expr (:block )
826
- firstloop = n == num_loops (ls)
827
- for ar ∈ ptrdefs
828
- ptr_offset = vptr_offset (ar)
829
- push! (loopstart. args, Expr (:(= ), ptr_offset, ptr_offset))
830
- end
831
- if iszero (termind)
832
- loopsym = names (ls)[n]
833
- push! (loopstart. args, startloop (getloop (ls, loopsym), loopsym))
834
- else
835
- isvectorized = n == vloopnum
836
- append_pointer_maxes! (loopstart, ls, ptrdefs[termind], n, submax, isvectorized)
837
- end
838
- loopstart
820
+ function startloop (ls:: LoopSet , us:: UnrollSpecification , n:: Int , staticinit:: Bool = false )
821
+ @unpack u₁loopnum, u₂loopnum, vloopnum, u₁, u₂ = us
822
+ lssm = ls. lssm
823
+ termind = lssm. terminators[n]
824
+ ptrdefs = lssm. incrementedptrs[n]
825
+ loopstart = Expr (:block )
826
+ firstloop = n == num_loops (ls)
827
+ for ar ∈ ptrdefs
828
+ ptr_offset = vptr_offset (ar)
829
+ push! (loopstart. args, Expr (:(= ), ptr_offset, ptr_offset))
830
+ end
831
+ if iszero (termind)
832
+ loopsym = names (ls)[n]
833
+ push! (loopstart. args, startloop (getloop (ls, loopsym), loopsym, staticinit))
834
+ else
835
+ isvectorized = n == vloopnum
836
+ submax = maxunroll (us, n)
837
+ append_pointer_maxes! (loopstart, ls, ptrdefs[termind], n, submax, isvectorized)
838
+ end
839
+ loopstart
839
840
end
840
841
function offset_ptr (
841
842
ar:: ArrayReferenceMeta , us:: UnrollSpecification , loopsym:: Symbol , n:: Int , UF:: Int , offsetinds:: Vector{Bool} , loop:: Loop
0 commit comments