https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123260
--- Comment #5 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Yichao Yu from comment #2)
> The pattern matching also doesn't work for direct use of `fma` function,
> i.e.,
>
> ```
> static inline void f(Complex &a, Complex &b, Complex &c)
> {
> a = {fma(-b.imag, c.imag, fma(b.real, c.real, a.real)),
> fma(b.imag, c.real, fma(b.real, c.imag, a.imag))};
> }
> ```
>
> even when in this case the instruction matches exactly what the source code
> asked for, with no floating point contraction required.
This would need to be handled differently. This wraps the calls in
__builtin_fma function so the SLP matcher will miss it entirely. This is
probably a match.pd pattern.