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] Add FMA_EXPR, un-cse multiplications before expansion


On Thu, Oct 21, 2010 at 10:14:36PM +0000, Joseph S. Myers wrote:
> Presumably it is intended that after this patch target maintainers should 
> describe fma instructions in the .md files *only* with fma RTL and not 
> with RTL for a*b+c?  Because FMA_EXPR will be generated at the GIMPLE 
> level and, ultimately, FP_CONTRACT controls will operate at the GIMPLE 
> level as well?
> 
> (It might make sense to add -ffp-contract={on,off,fast} at an early stage, 
> with "off" disabling the GIMPLE-level FMA formation.  Implementation of 
> the pragma, and distinguishing "on" (C99-conforming, contracting 
> restricted to source expressions) from "fast" (no such restriction on 
> contracting, the present state) could follow later.)

I would imagine there are some people in the world for whom the fma builtin was
created for in the C99 standard that don't want (a*b)+c automatically converted
into a FMA op, but do want to be able to use FMA explicitly when they need a
fused multiply/add.  Right now on the powerpc, the fma builtin is NOT
predicated on whether the user turned off automatic conversion into a FMA
operation (-mno-fused-madd).

I had left the C99 standards committee before FMA came in, so I wasn't part of
the discussion for it.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com


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