• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -instcombine -S | FileCheck %s
2
3define float @mytan(float %x) {
4  %call = call fast float @atanf(float %x)
5  %call1 = call fast float @tanf(float %call)
6  ret float %call1
7}
8
9; CHECK-LABEL: define float @mytan(
10; CHECK:   ret float %x
11
12define float @test2(float ()* %fptr) {
13  %call1 = call fast float %fptr()
14  %tan = call fast float @tanf(float %call1)
15  ret float %tan
16}
17
18; CHECK-LABEL: @test2
19; CHECK: tanf
20
21declare float @tanf(float)
22declare float @atanf(float)
23
24