[PATCH] D14302: [SimplifyLibCalls] Add a new transform: tan(atan(x)) -> x

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 15:00:21 PST 2015


On Tue, Nov 03, 2015 at 09:36:36PM +0000, Steve Canon via llvm-commits wrote:
> scanon added a comment.
> 
> I'd like to see this made generic so it applies to any 1-to-1 libm function whose inverse is available, since the same pattern applies for  logN(expN(x)), asinh(sinh(x)), atanh(tanh(x)), etc ...

Just to make sure we are on the same page, the inner function has to be
injective and operate on the full domain of real numbers. The outer
function has to be surjective and map to the appropiate (principal)
value.

Joerg


More information about the llvm-commits mailing list