In fast-math mode, in some cases a DAG like
(fadd (fma (a, b, ... (fma (c, d, (fmul (e, f)))))), g)
can occur (for instance, when combining several fadds and fmulsThis patch changes a FADD / FMUL => FMA ISel pattern implemented
into fma instructions), but being left with an outermost fadd and an innermost fmul, this sequence can be transformed into
(fadd (fma (a, b, ... (fma (c, d, g)))), (fmul (e, D80801 so that it peeks through more than one FMA. f))
which swaps the solidary operand from the fadd with theThis also
innermost fmul.changes the order of the operands, This allows for generating even more fma instructionswhich can help with eliminating
a final COPY.