[SimplifyLibCalls] New transformation: tan(atan(x)) -> x
[oota-llvm.git] / test / Transforms / InstCombine / tan.ll
1 ; RUN: opt < %s -instcombine -S | FileCheck %s
2
3 define float @mytan(float %x) #0 {
4 entry:
5   %call = call float @atanf(float %x)
6   %call1 = call float @tanf(float %call)
7   ret float %call1
8 }
9
10 ; CHECK-LABEL: define float @mytan(
11 ; CHECK:   ret float %x
12
13 declare float @tanf(float) #0
14 declare float @atanf(float) #0
15 attributes #0 = { "unsafe-fp-math"="true" }