[PATCH] D41286: [InstCombine] Missed optimization in math expression: sin(x) / cos(x) => tan(x)
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 08:07:41 PST 2018
davide requested changes to this revision.
davide added a subscriber: scanon.
davide added a comment.
This revision now requires changes to proceed.
@scanon should sign off this.
================
Comment at: lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:1472
+ // sin(a) / cos(a) -> tan(a)
+ if (AllowReassociate) {
----------------
spatel wrote:
> Should we also handle:
> cos(a) / sin(a) -> 1 / tan(a)
> ?
Please wait for @scanon opinion before implementing every possible 10th grade trigonometrical identity.
https://reviews.llvm.org/D41286
More information about the llvm-commits
mailing list