[llvm] r256964 - [LibCallSimplifier] use instruction-level fast-math-flags for tan/atan transform

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 6 15:53:43 PST 2016


On Wed, Jan 6, 2016 at 4:39 PM, Davide Italiano <davide at freebsd.org> wrote:

> On Wed, Jan 6, 2016 at 11:23 AM, Sanjay Patel via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: spatel
> > Date: Wed Jan  6 13:23:35 2016
> > New Revision: 256964
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=256964&view=rev
> > Log:
> > [LibCallSimplifier] use instruction-level fast-math-flags for tan/atan
> transform
> >
>
> Oh thanks, this is very nice and have been in my TODO list for a while
> (but other stuffs had higher priority). Your comment mentions "trig
> functions" and their inverse -- is there a reason why this can't be
> extended to pair of functions which are one the inverse of each other
> (e.g. exp/log)?
>

No, there's no reason this shouldn't be extended to any inverse pairs. I
just didn't think past "if tan(), why not sin()?"
I think another hole is that we only recognize one direction. Eg,
tan(atan(x)) --> x , but atan(tan(x)) isn't matched.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160106/4a5fac2f/attachment.html>


More information about the llvm-commits mailing list