Skip to content

Commit 35257f3

Browse files
committed
check branches in contract_pass!
1 parent 0d4c555 commit 35257f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vectorizationbase_compat/contract_pass.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function capture_a_muladd(ex::Expr, mod)
172172
true, call
173173
end
174174
function capture_muladd(ex::Expr, mod)
175-
while true
175+
while true
176176
ex.head === :ref && return ex
177177
found, ex = capture_a_muladd(ex, mod)
178178
found || return ex
@@ -210,7 +210,7 @@ function contract!(expr::Expr, ex::Expr, i::Int, mod)
210210
if ex.head === :(=)
211211
RHS = ex.args[2]
212212
# @show ex
213-
if RHS isa Expr && RHS.head === :call
213+
if RHS isa Expr && Base.sym_in(RHS.head, (:call,:if))
214214
ex.args[2] = capture_muladd(RHS, mod)
215215
end
216216
end

0 commit comments

Comments
 (0)