<div style="font-family: arial, helvetica, sans-serif"><font size="2"><div class="gmail_quote">On Thu, Jun 21, 2012 at 11:28 AM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>Hi Steve, Chandler, Hal,</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>That said, I don't love overloading excess-precision for this, even if fma is formally a special case of excess precision, mostly because excess precision has even more bizarre corner cases -- it leads to such monstrosities as cos(x) != cos(x).</div>

</div></blockquote><div> </div></div><div>Sounds like -fexcess-precision is too blunt of an instrument for this. Should setting -fexcess-precision=fast enable this optimization though?</div></div></blockquote><div><br></div>
<div>I'm leery of it doing anything other than allowing use of higher precision registers... Mostly because I don't want to ever get a bug report about it. ;] Others may be less reluctant though.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div><div><font face="arial, helvetica, sans-serif"></font></div><blockquote type="cite"><div>If we're not going to use excess-precision, I would suggest a name that is completely explicit; something along the lines of -fallow-fma-anywhere or -fallow-fma-across-expressions (those might be too wordy).</div>

</blockquote></div></div></div></blockquote></div><div>"-fallow-fma-anywhere" sounds fine to me if this flag is going to be targeted specifically at FMA formation. Does anybody have any objections to this? </div>
</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><br>
</div><div>Should this flag, whatever it's eventually called, have a "never-form" mode that over-rides FP_CONTRACT and prevents any FMA formation? That seems like it could be useful, if only for debugging. FP_CONTRACT doesn't guarantee any fusing, so a flag that disabled any fusing wouldn't violate FP_CONTRACT semantics, it would just provide a baseline with no fusing carried out. This is what I had in mind when I penned the comments that you referred to Hal.</div>

<div><br></div><div>In that case an alternative flag could be:</div><div><br></div><div>"-fform-fma={anywhere,standard,never}"</div></div></blockquote><div><br></div><div>I do think that "never" is an important mode. I like the term "strict" for that personally, but paint the bikeshed as you like.</div>
<div><br></div><div>I wouldn't restrict this to FMA though, at the very least there is a fused mul+sub on some architectures... How about this shade of blue for our favorite shed:</div><div><br></div><div>-ffuse-fp-ops={fast,standard,never}</div>
<div><br></div><div>Where 'fast' allows any amount of fusing, 'standard' only allows that which is allowed in the relevant language standard (FP_CONTRACT), and 'never' (or 'strict') completely disables op fusion?</div>
</div></font></div>