This is the mail archive of the 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: MIPS patch for nmadd/nmsub w/wo fast-math

James E Wilson <> writes:
> While working on the vector float stuff, I noticed that we didn't
> generate nmadd instructions when -ffast-math was used.  Then I noticed
> that we didn't generate nmsub instructions unless -ffast-math was used.
> This is an unfortunate side-effect of a change from Geoff Keating in Dec
> 2002.  Because some FP optimizations can only be performed when
> -ffast-math is used, we end up with different canonical representations
> for nmadd/nmsub depending on whether -ffast-math was used.  Thus we need
> two patterns for them in the md file, one for the normal case and one
> for the fast math case.  This is a bit annoying,

Indeed.  My attempts to reduce the cut-&-paste patterns in
are obviously doomed to fail ;)

>                                                  but I don't see any way
> around it.  We will lose some optimizations if we don't canonicalize
> this way.

Indeed.  Patch looks OK to me, except for the very minor nit below.
Please do add a scan-assembler testcase to dejagnu though.  Preferrably
one for -ffast-math and one for -fno-fast-math.


Please write as:


and similarly elsewhere.

I know the overlong line is a pre-existing problem, but it's nice
to clean these things up.  Also, the coding conventions say there
should be no space after "!".  (The code's hardly consistent on that
front, but I've been trying to follow it when making changes.)
Sorry for such anal comments!


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