This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: powerpc extra fmadd insn patterns for -ffast-math



> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]