Skip to content

Commit 57b715f

Browse files
committed
Remove LHS argument from mul_add
1 parent b3bec89 commit 57b715f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/vectorizationbase_compat/contract_pass.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,21 +114,20 @@ function recursive_muladd_search!(call, argv, cnmul::Bool = false, csub::Bool =
114114
length(call.args) == 4, cnmul, csub
115115
end
116116

117-
function capture_muladd(ex::Expr, mod, @nospecialize(LHS) = nothing)
117+
function capture_muladd(ex::Expr, mod)
118118
call = Expr(:call, Symbol(""), Symbol(""), Symbol(""))
119119
found, nmul, sub = recursive_muladd_search!(call, ex.args)
120120
found || return ex
121121
# a, b, c = call.args[2], call.args[3], call.args[4]
122122
# call.args[2], call.args[3], call.args[4] = c, a, b
123-
clobber = false#call.args[4] == LHS
124123
f = if nmul && sub
125-
clobber ? :vfnmsub231 : :vfnmsub
124+
:vfnmsub
126125
elseif nmul
127-
clobber ? :vfnmadd231 : :vfnmadd
126+
:vfnmadd
128127
elseif sub
129-
clobber ? :vfmsub231 : :vfmsub
128+
:vfmsub
130129
else
131-
clobber ? :vfmadd231 : :vfmadd
130+
:vfmadd
132131
end
133132
if mod === nothing
134133
call.args[1] = f
@@ -163,7 +162,7 @@ function contract!(expr::Expr, ex::Expr, i::Int, mod)
163162
RHS = ex.args[2]
164163
# @show ex
165164
if RHS isa Expr && RHS.head === :call
166-
ex.args[2] = capture_muladd(RHS, mod, ex.args[1])
165+
ex.args[2] = capture_muladd(RHS, mod)
167166
end
168167
end
169168
contract_pass!(expr.args[i], mod)

0 commit comments

Comments
 (0)