<div dir="ltr">On Fri, Jan 11, 2013 at 3:16 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><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: <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 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>
</div><div><div class="h5">> 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 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 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 precision<br>
> reasons.<br>
<br>
</div></div>Yes, I believe that's right. This way you can still always get an fma with the intrinsic.<br></blockquote><div><br></div><div style>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?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Hal<br>
<br>
><br>
> -David<br>
<div class="HOEnZb"><div class="h5">><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"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div></div>