<div dir="ltr">Hi David,<br><br><div>Good point. But I'm not sure how that's different for fcmp than for all the other fast-math operations. For example:</div><div><br></div><div>  %1 = fdiv double 1.0, %a</div><div>  %2 = fdiv arcp double 1.0, %1</div><div><br></div><div>Is this allowed to be converted to %a?</div><div><br></div><div>I think I'd say that yes, those are allowed. I'm struggling to come up with a formal statement of why. I suppose the problem is where you have a more relaxed operation using a less relaxed one, do you allow that relaxation to "infect" the arguments?</div><div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><br><div class="gmail_quote">On Fri, 15 May 2015 at 21:55 David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">REPOSITORY<br>
  rL LLVM<br>
<br>
================<br>
Comment at: docs/LangRef.rst:6945-6948<br>
@@ -6944,2 +6944,6 @@<br>
<br>
+The ``fcmp`` instruction can also optionally take any number of<br>
+:ref:`fast-math flags <fastmath>`, which are optimization hints to enable<br>
+otherwise unsafe floating point optimizations.<br>
+<br>
 Example:<br>
----------------<br>
We really need to say more here about the semantics of fast math flags in this position.<br>
<br>
For example, does `arcp` on an fcmp imply that i can take:<br>
  %div = fdiv double 1.000000e+00, %a<br>
  %div1 = fdiv double 1.000000e+00, %b<br>
  %cmp = fcmp arcp olt double %div, %div1<br>
<br>
and replace it with:<br>
  %cmp = fcmp ogt double %a, %b<br>
<br>
?<br>
<br>
<a href="http://reviews.llvm.org/D9793" target="_blank">http://reviews.llvm.org/D9793</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>