1; RUN: opt < %s -instcombine -S | FileCheck %s
2
3define float @mytan(float %x) #0 {
4entry:
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
13define float @test2(float ()* %fptr) #0 {
14  %call1 = call float %fptr()
15  %tan = call float @tanf(float %call1)
16  ret float %tan
17}
18
19; CHECK-LABEL: @test2
20; CHECK: tanf
21
22declare float @tanf(float) #0
23declare float @atanf(float) #0
24attributes #0 = { "unsafe-fp-math"="true" }
25