xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/tan-nofastmath.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -instcombine -S | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdefine float @mytan(float %x) {
4*9880d681SAndroid Build Coastguard Workerentry:
5*9880d681SAndroid Build Coastguard Worker  %call = call float @atanf(float %x)
6*9880d681SAndroid Build Coastguard Worker  %call1 = call float @tanf(float %call)
7*9880d681SAndroid Build Coastguard Worker  ret float %call1
8*9880d681SAndroid Build Coastguard Worker}
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: define float @mytan(
11*9880d681SAndroid Build Coastguard Worker; CHECK:   %call = call float @atanf(float %x)
12*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   %call1 = call float @tanf(float %call)
13*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   ret float %call1
14*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: }
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Workerdeclare float @tanf(float)
17*9880d681SAndroid Build Coastguard Workerdeclare float @atanf(float)
18