Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiply-add with minus signs doesn't get converted to muladd #5

Closed
ikirill opened this issue Sep 18, 2017 · 1 comment · Fixed by #7
Closed

Multiply-add with minus signs doesn't get converted to muladd #5

ikirill opened this issue Sep 18, 2017 · 1 comment · Fixed by #7

Comments

@ikirill
Copy link

ikirill commented Sep 18, 2017

I expected this to work, but it didn't. There is generally no problem with having minus signs inside muladd, because FMA instructions allow for that, so expressions like b-a*x should be converted to muladd(-a, x, b).

julia> macroexpand(:(MuladdMacro.@muladd b - a * x))
:(b - a * x)

julia> macroexpand(:(MuladdMacro.@muladd b + a * x))
:((muladd)(a, x, b))
@ChrisRackauckas
Copy link
Member

Yeah, it looks like we're missing this. We're looking directly for +s and handling that. I'm not sure the easiest way to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants