This patch enables folding tan(x) * cos(x) -> sin(x) under -ffast-math flag
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This needs to be merged first, because it introduces m_LibFunc match, that would be useful for other optimizations.
Comment Actions
Then we should find out. :)
I should've asked before 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?
Please see my comments in D41389 about names.