This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rs6000 fused multiply-add patch [+ patchlet]
Geoff Keating wrote:
> The canonical form for (mult A (neg B)) is (mult (neg A) B);
> this is documented but may not be implemented. If it was implemented,
> (mult (neg A) (neg B)) should be simplified to (mult (neg (neg A)) B),
> and that simplifies down to (mult A B).
I'll make a patch to fix that, then.
> > Oh btw, for a function like
> >
> > float bla(float a, float b, float c)
> > {
> > return a + b * c;
> > }
> >
> > gcc generates something like
> >
> > fmadds 2,2,3,1
> > fmr 1,2
> > blr
> >
> > any idea what needs to be fixed to get rid of the fmr insn?
>
> The register allocator.
I was hoping for something a little bit more specific than this, like,
if it's a known shortcoming for example.
Segher