[PATCH] Add support for fast-math flags to the FCmp instruction.

hfinkel at anl.gov hfinkel at anl.gov
Mon May 18 15:25:10 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: docs/LangRef.rst:6945-6948
@@ -6944,2 +6944,6 @@
 
+The ``fcmp`` instruction can also optionally take any number of
+:ref:`fast-math flags <fastmath>`, which are optimization hints to enable
+otherwise unsafe floating point optimizations.
+
 Example:
----------------
majnemer wrote:
> We really need to say more here about the semantics of fast math flags in this position.
> 
> For example, does `arcp` on an fcmp imply that i can take:
>   %div = fdiv double 1.000000e+00, %a
>   %div1 = fdiv double 1.000000e+00, %b
>   %cmp = fcmp arcp olt double %div, %div1
> 
> and replace it with:
>   %cmp = fcmp ogt double %a, %b
> 
> ?
I agree. FWIW, I'd say the answer should be no. We should require arcp on the fdivs for that.

http://reviews.llvm.org/D9793

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list