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
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: segher at chello dot nl
- Cc: David Edelsohn <dje at watson dot ibm dot com>, gcc-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Tue, 02 Apr 2002 13:21:13 +0100
- Subject: Re: PATCH: powerpc extra fmadd insn patterns for -ffast-math
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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).
>
> I've been looking at it, and I think the best way to solve this is
> in combine, as well. I'm quite a newbie wrt gcc hacking, so any hints
> are very welcome :)
>
> [ Almost the same thing happens on ARM, with code like
> x = a + (b >> 5);
> y = a - (b >> 5);
> ]
Yep, that's a known deficiency.
http://gcc.gnu.org/projects/#un_cse
R.