This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: powerpc extra fmadd insn patterns for -ffast-math
On Fri, Mar 29, 2002 at 08:19:39PM +0100, Segher Boessenkool wrote:
> A related (and somewhat worse, for me) problem is, that stuff like
>
> x = a + b * c;
> y = a - b * c;
>
> gets CSE'ed into a separate mul, add, and sub, while two fma insns
> is better (all of: smaller code, smaller execution cost, lower latency).
Yes, a well-known problem.
> I've been looking at it, and I think the best way to solve this is
> in combine, as well.
Combine was not designed to handle this. Modifying it to try is
probably a mistake. This should be handled with some form of CSE.
r~