Skip to content

Commit

Permalink
Prefetch in more cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Jul 5, 2020
1 parent 76bfeca commit e77b070
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LoopVectorization"
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
authors = ["Chris Elrod <[email protected]>"]
version = "0.8.10"
version = "0.8.11"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand Down
3 changes: 2 additions & 1 deletion src/lower_load.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ end
function prefetchisagoodidea(ls::LoopSet, op::Operation, td::UnrollArgs)
# return false
@unpack u₁, u₁loopsym, u₂loopsym, vectorized, u₂max, suffix = td
length(loopdependencies(op)) 1 && return 0
vectorized loopdependencies(op) || return 0
u₂loopsym === Symbol("##undefined##") && return 0
dontskip = (VectorizationBase.CACHELINE_SIZE ÷ VectorizationBase.REGISTER_SIZE) - 1
Expand All @@ -78,7 +79,7 @@ function prefetchisagoodidea(ls::LoopSet, op::Operation, td::UnrollArgs)
loopedindex = op.ref.loopedindex
if length(loopedindex) > 1 && first(loopedindex)
indices = getindices(op)
if first(indices) === vectorized && last(indices) === innermostloopsym
if first(indices) === vectorized && first(indices) !== innermostloopsym
# We want at least 4 reuses per load
uses = ifelse(isu₁unrolled(op), 1, u₁)
uses = ifelse(isu₂unrolled(op), uses, uses * u₂max)
Expand Down

2 comments on commit e77b070

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/17466

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.11 -m "<description of version>" e77b07088ba170b8f645678b95a03e73cc13cb14
git push origin v0.8.11

Please sign in to comment.