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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 16:12:38 PDT 2017


spatel 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).
+
----------------
efriedma wrote:
> 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.
I think we'd include sqrt() in the 'trans' bucket (so maybe 'libm' was the better name). But looking back through the dev thread, I don't see an actual definition of that term or what this flag would map to as a clang command-line param. @hfinkel / @wristow - suggestions?


https://reviews.llvm.org/D39304





More information about the llvm-commits mailing list