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

David Majnemer david.majnemer at gmail.com
Fri May 15 13:52:03 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:
----------------
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

?

http://reviews.llvm.org/D9793

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






More information about the llvm-commits mailing list