[PATCH] D39304: [IR] redefine 'reassoc' fast-math-flag and add 'trans' fast-math-flag

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 15:07:48 PDT 2017


efriedma added inline comments.


================
Comment at: docs/LangRef.rst:2283
+   Allow operations to be simplified assuming relaxed precision for
+   transcendental functions usually found in math libraries (sin, log, etc).
+
----------------
Could you mark up the LLVM intrinsics affected by the "trans" flag with the meaning with/without the flag?

Please clarify the language here to indicate this affects the semantics of both LLVM intrinsics and known library functions.  And include a more complete description of what counts as a known library function. And explain what "relaxed" means, given that libm generally doesn't provide correctly rounded versions of transcendental functions.

Also, do we want to optimize sqrt() based on this flag?  It technically isn't transcendental, but we currently generate an approximation in some cases based on fast-math flags.


https://reviews.llvm.org/D39304





More information about the llvm-commits mailing list