[PATCH] D41283: [InstCombine] Missed optimization in math expression: tan(a) * cos(a) == sin(a)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 10:10:35 PST 2018
spatel added a subscriber: efriedma.
spatel added a comment.
In https://reviews.llvm.org/D41283#974808, @Quolyk wrote:
> In https://reviews.llvm.org/D41283#974798, @spatel wrote:
>
> > Why doesn't tan have an LLVM intrinsic like sin/cos?
>
>
> I don't know
Then we should find out. :)
I should've asked before https://reviews.llvm.org/D41286, but oops.
cc @efriedma in case he knows the history. If not, you should ask on llvm-dev. Maybe it's just not as common to see tan in code, but if we're going to do more trig transforms, I think it would make sense to have uniformity of trig intrinsics, so it's easier to do these folds. Also, if the vectorizers recognize trig functions, it would make it easier for them if we have more intrinsics for these functions?
https://reviews.llvm.org/D41283
More information about the llvm-commits
mailing list