Skip to content

Commit 82ce267

Browse files
committed
Minor cleanup; don't calculate some things that are unneeded
1 parent 5a5ce54 commit 82ce267

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
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.42"
4+
version = "0.12.43"
55

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

src/parse/add_compute.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,17 @@ function add_reduction_update_parent!(
185185
var = name(parent)
186186
isouterreduction = parent.instruction === LOOPCONSTANT
187187
# @show instr, vparents, parent, reduction_ind
188-
if instr.instr === :ifelse
189-
@assert length(vparents) == 2
190-
instrclass = reduction_instruction_class(instruction(vparents[2])) # key allows for faster lookups
191-
else
192-
instrclass = reduction_instruction_class(instr) # key allows for faster lookups
193-
end
194-
reduct_zero = reduction_zero(instrclass)
195188
# if parent is not an outer reduction...
196189
# if !isouterreduction && !isreductzero(parent, ls, reduct_zero)
197190
add_reduct_instruct = !isouterreduction && !isconstant(parent)
198191
if add_reduct_instruct
192+
if instr.instr === :ifelse
193+
@assert length(vparents) == 2
194+
instrclass = reduction_instruction_class(instruction(vparents[2])) # key allows for faster lookups
195+
else
196+
instrclass = reduction_instruction_class(instr) # key allows for faster lookups
197+
end
198+
reduct_zero = reduction_zero(instrclass)
199199
# We add
200200
reductcombine = reduction_scalar_combine(instrclass)
201201
# reductcombine = :identity

0 commit comments

Comments
 (0)