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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 6 15:58:03 PST 2016


On Wed, Jan 6, 2016 at 3:53 PM, Sanjay Patel <spatel at rotateright.com> wrote:
>
>
> 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.
>

Indeed. If you feel inspired you might want to improve the comment to
reflect reality -- although I wouldn't worry too much =)


-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list