<div dir="ltr">>
I think you have a different definition of fused then. Fused is a description of how the operation is computed/rounded, not an instruction count. <br><div><br></div><div><span style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:16px">"Only fuse FP ops when the result won't be affected" is what the existing comment says. So it can't be both a fused op and not a fused op if it's only meant to imply a difference in rounding. I'm just re-using the existing wording, and I agree it could be cleaned up if that's the intent of the -fp-contract option -- which I why I was asking for context.</span></div><div><span style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:16px"><br></span></div><div>> For FMA, I think your example IR is correctly handled. The fast instruction flag should override the global FP option you’re providing. For the issue you are describing, this is more of a question of whether clang should be emitting the fast flag or not. </div><div><span style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:16px"><br></span></div><div><font color="#000000" face="Calibri, sans-serif"><span style="font-size:16px">I disagree. How does clang know what would ultimately form an FMA? It would have to blanket remove 'fast' from all fadds. </span></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2019 at 4:16 PM Matt Arsenault <<a href="mailto:arsenm2@gmail.com" target="_blank">arsenm2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div><br><blockquote type="cite"><div>On Jul 10, 2019, at 16:56, Scott Manley <<a href="mailto:rscottmanley@gmail.com" target="_blank">rscottmanley@gmail.com</a>> wrote:</div><br class="gmail-m_4306197701785154487gmail-m_-8592497960956107562Apple-interchange-newline"><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">At any rate, I was only offering an additional reason. Personally I think it's strange for an option to say "this will never fuse ops" and then under the covers will fuse ops, regardless of how FMAD is defined. However, my primary concern is for FMAs. They have both numeric and performance implications and I do not think it's unreasonable that off means off.</span><br class="gmail-m_4306197701785154487gmail-m_-8592497960956107562Apple-interchange-newline"></div></blockquote></div><br><div>I think you have a different definition of fused then. Fused is a description of how the operation is computed/rounded, not an instruction count. The F in FMAD is not fused (I know this naming scheme is not great. Every other FP node besides FMA has an F prefix)</div><div><br></div><div>For FMA, I think your example IR is correctly handled. The fast instruction flag should override the global FP option you’re providing. For the issue you are describing, this is more of a question of whether clang should be emitting the fast flag or not.</div><div><br></div><div>-Matt</div></div></blockquote></div>