<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 11, 2013 at 3:23 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">----- Original Message -----<br>
> From: "Justin Holewinski" <<a href="mailto:justin.holewinski@gmail.com">justin.holewinski@gmail.com</a>><br>
> To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>
</div><div><div class="h5">> Cc: "David A. Greene" <<a href="mailto:dag@cray.com">dag@cray.com</a>>, "LLVM Developers Mailing List" <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>

> Sent: Friday, January 11, 2013 2:19:01 PM<br>
> Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic<br>
><br>
><br>
> On Fri, Jan 11, 2013 at 3:16 PM, Hal Finkel < <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> ><br>
> wrote:<br>
><br>
><br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> > From: <a href="mailto:dag@cray.com">dag@cray.com</a><br>
> > To: "Justin Holewinski" < <a href="mailto:justin.holewinski@gmail.com">justin.holewinski@gmail.com</a> ><br>
> > Cc: "Hal Finkel" < <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> >, "LLVM Developers Mailing<br>
> > List" < <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> ><br>
> > Sent: Friday, January 11, 2013 2:13:50 PM<br>
> > Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic<br>
> ><br>
><br>
><br>
> > Justin Holewinski < <a href="mailto:justin.holewinski@gmail.com">justin.holewinski@gmail.com</a> > writes:<br>
> ><br>
> > > Out of curiosity, what is the use-case for<br>
> > > isFMAFasterThanMulAndAdd?<br>
> > > If a target declares that FMA is actually slower for a given<br>
> > > type,<br>
> > > why not just declare it as illegal for that type? Wouldn't that<br>
> > > accomplish the same thing without another target hook? I feel<br>
> > > like<br>
> > > I'm<br>
> > > missing something here.<br>
> ><br>
> > It's not expressed in the code Hal posted but I suppose a target<br>
> > could<br>
> > have a slow fma that the user nonetheless wants to use for<br>
> > precision<br>
> > reasons.<br>
><br>
> Yes, I believe that's right. This way you can still always get an fma<br>
> with the intrinsic.<br>
><br>
><br>
><br>
> Now I'm confused. If a target declares that fmuladd is "slow" for a<br>
> given type, it will be lowered to mul + add in SDAG anyway<br>
> (according to this code snippet). So how could a user override this?<br>
<br>
</div></div>The user should use the fma intrinsic directly. There are now two intrinsics, fma and fmuladd.<br></blockquote><div><br></div><div>Ah, alright.  I missed that there are actually two different intrinsics.<br></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
 -Hal<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
><br>
><br>
> -Hal<br>
><br>
> ><br>
> > -David<br>
><br>
><br>
> ><br>
><br>
> --<br>
> Hal Finkel<br>
> Postdoctoral Appointee<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
><br>
><br>
><br>
><br>
> --<br>
><br>
><br>
> Thanks,<br>
><br>
><br>
> Justin Holewinski<br>
<br>
--<br>
Hal Finkel<br>
Postdoctoral Appointee<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div></div>