This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] Add FMA support for MIPS
On Sun, Nov 7, 2010 at 1:32 PM, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> "Joseph S. Myers" <joseph@codesourcery.com> writes:
>> Are you sure these are fused operations? ?The MIPS32 manual I have to hand
>> right now (MD00086 Revision 2.62) says explicitly for MADD.fmt, for
>> example: "The intermediate product is rounded according to the current
>> rounding mode in FCSR. ... ?The results and flags are as if separate
>> floating-point multiply and add instructions were executed.".
>
> Ouch. ?Serves me right for not checking. ?They were fused in the
> original R8000 implementation, but now I look at the MIPS IV spec,
> it too explicitly says that only revisions of the R8000 used the
> fused model, and that all subsequent MIPS IV implementations used
> the unfused one.
>
> R8000 isn't important enough now to support a whole different model,
> so... patch reverted and brown paper bag duly adopted. ?Thanks a lot
> for catching my carelessness before it found its way into a release.
Well, the patch is still ok if you restrict the patterns to
flag_unsafe_math_optimizations.
For the -(a*b+c) variants we could introduce different named expanders
as well btw.
Richard.
> Richard
>