[LLVMdev] Documentation of fmuladd intrinsic

Justin Holewinski justin.holewinski at gmail.com
Fri Jan 11 12:19:01 PST 2013


On Fri, Jan 11, 2013 at 3:16 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> ----- Original Message -----
> > From: dag at cray.com
> > To: "Justin Holewinski" <justin.holewinski at gmail.com>
> > Cc: "Hal Finkel" <hfinkel at anl.gov>, "LLVM Developers Mailing List" <
> llvmdev at cs.uiuc.edu>
> > Sent: Friday, January 11, 2013 2:13:50 PM
> > Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic
> >
> > Justin Holewinski <justin.holewinski at gmail.com> writes:
> >
> > > Out of curiosity, what is the use-case for
> > > isFMAFasterThanMulAndAdd?
> > >  If a target declares that FMA is actually slower for a given type,
> > > why not just declare it as illegal for that type?  Wouldn't that
> > > accomplish the same thing without another target hook?  I feel like
> > > I'm
> > > missing something here.
> >
> > It's not expressed in the code Hal posted but I suppose a target
> > could
> > have a slow fma that the user nonetheless wants to use for precision
> > reasons.
>
> Yes, I believe that's right. This way you can still always get an fma with
> the intrinsic.
>

Now I'm confused.  If a target declares that fmuladd is "slow" for a given
type, it will be lowered to mul + add in SDAG anyway (according to this
code snippet).  So how could a user override this?


>
>  -Hal
>
> >
> >                               -David
> >
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
>



-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130111/4a028a31/attachment.html>


More information about the llvm-dev mailing list