Skip to content

Commit 3825b50

Browse files
committed
Sys.CPU_NAME is not inferred, so move znver1 check to a global constant.
1 parent 1b07d0b commit 3825b50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lowering.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ end
802802
function lsexpr(ls::LoopSet, q)
803803
Expr(:block, ls.preamble, q)
804804
end
805-
805+
const ISZEN1 = Sys.CPU_NAME === "znver1"
806806
function calc_Ureduct(ls::LoopSet, us::UnrollSpecification)
807807
@unpack u₁loopnum, u₁, u₂, vectorizedloopnum = us
808808
if iszero(length(ls.outer_reductions))
@@ -811,7 +811,7 @@ function calc_Ureduct(ls::LoopSet, us::UnrollSpecification)
811811
loopisstatic = isstaticloop(getloop(ls, names(ls)[u₁loopnum]))
812812
loopisstatic &= ((vectorizedloopnum != u₁loopnum) | (!iszero(ls.vector_width[])))
813813
# loopisstatic ? u₁ : min(u₁, 4) # much worse than the other two options, don't use this one
814-
if Sys.CPU_NAME === "znver1"
814+
if ISZEN1
815815
loopisstatic ? u₁ : 1
816816
else
817817
loopisstatic ? u₁ : (u₁ 4 ? 2 : 1)

0 commit comments

Comments
 (0)