Skip to content

Commit 065ce6e

Browse files
committed
Define intermediateconstref's name in case dependent operations are hoisted; fixes #277.
1 parent d7e1aad commit 065ce6e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LoopVectorization"
22
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
33
authors = ["Chris Elrod <[email protected]>"]
4-
version = "0.12.28"
4+
version = "0.12.29"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/modeling/graphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ staticmulincr(ptr, incr) = Expr(:call, lv(:staticmul), Expr(:call, :eltype, ptr)
214214
@inline vcmpendzs(i::Int, r::AbstractUnitRange, ::StaticInt{W}) where {W} = i (length(r) & (-W))
215215
# i = 0
216216
# i += 4*3 # i = 12
217-
@inline vcmpend(i::Int, r::AbstractRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), vsub_nsw(W*step(r), 1))
217+
@inline vcmpend(i::Int, r::AbstractRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), vsub_nsw(W*step(r), 1))
218218
@inline vcmpendzs(i::Int, r::AbstractRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), vsub_nsw(W*step(r), 1))
219219

220220
function staticloopexpr(loop::Loop)

src/parse/add_constants.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function add_constant!(ls::LoopSet, mpref::ArrayReferenceMetaPosition, elementby
5353
end
5454
push!(vloadcall.args, Expr(:call, lv(:False)), staticexpr(reg_size(ls)))
5555
pushpreamble!(ls, Expr(:(=), temp, vloadcall))
56+
pushpreamble!(ls, Expr(:(=), name(op), temp))
5657
pushpreamble!(ls, op, temp)
5758
pushop!(ls, op, temp)
5859
end

0 commit comments

Comments
 (0)