1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=early-cse -earlycse-debug-hash -S -o - %s | FileCheck %s
4 declare double @acos(double) #0
5 define double @f_acos() {
6 ; CHECK-LABEL: @f_acos(
7 ; CHECK-NEXT: ret double 0.000000e+00
9 %res = tail call fast double @acos(double 1.0)
13 declare float @asinf(float) #0
14 define float @f_asinf() {
15 ; CHECK-LABEL: @f_asinf(
16 ; CHECK-NEXT: ret float 0x3FF921FB{{.+}}
18 %res = tail call fast float @asinf(float 1.0)
22 declare double @atan(double) #0
23 define double @f_atan() {
24 ; CHECK-LABEL: @f_atan(
25 ; CHECK-NEXT: ret double 0x3FE921FB
27 %res = tail call fast double @atan(double 1.0)
31 declare float @cosf(float) #0
32 define float @f_cosf() {
33 ; CHECK-LABEL: @f_cosf(
34 ; CHECK-NEXT: ret float 0x3FE14A2{{.+}}
36 %res = tail call fast float @cosf(float 1.0)
40 declare float @llvm.cos.f32(float)
41 define float @i_cosf() {
42 ; CHECK-LABEL: @i_cosf(
43 ; CHECK-NEXT: ret float 0x3FE14A2
45 %res = tail call fast float @llvm.cos.f32(float 1.0)
49 declare double @cosh(double) #0
50 define double @f_cosh() {
51 ; CHECK-LABEL: @f_cosh(
52 ; CHECK-NEXT: ret double 0x3FF8B075{{.+}}
54 %res = tail call fast double @cosh(double 1.0)
58 declare float @expf(float) #0
59 define float @f_expf() {
60 ; CHECK-LABEL: @f_expf(
61 ; CHECK-NEXT: ret float 0x4005BF0A{{.+}}
63 %res = tail call fast float @expf(float 1.0)
67 declare float @llvm.exp.f32(float)
68 define float @i_expf() {
69 ; CHECK-LABEL: @i_expf(
70 ; CHECK-NEXT: ret float 0x4005BF0A{{.+}}
72 %res = tail call fast float @llvm.exp.f32(float 1.0)
76 declare double @exp2(double) #0
77 define double @f_exp2() {
78 ; CHECK-LABEL: @f_exp2(
79 ; CHECK-NEXT: ret double 2.000000e+00
81 %res = tail call fast double @exp2(double 1.0)
85 declare double @llvm.exp2.f64(double)
86 define double @i_exp2() {
87 ; CHECK-LABEL: @i_exp2(
88 ; CHECK-NEXT: ret double 2.000000e+00
90 %res = tail call fast double @llvm.exp2.f64(double 1.0)
94 ; FIXME: exp10() is not widely supported.
95 declare float @exp10f(float) #0
96 define float @f_exp10f() {
97 ; CHECK-LABEL: @f_exp10f(
98 ; CHECK-NEXT: [[RES:%.*]] = tail call float @exp10f(float 1.000000e+00)
99 ; CHECK-NEXT: ret float [[RES]]
101 %res = tail call float @exp10f(float 1.0)
105 declare double @log(double) #0
106 define double @f_log() {
107 ; CHECK-LABEL: @f_log(
108 ; CHECK-NEXT: ret double 0.000000e+00
110 %res = tail call fast double @log(double 1.0)
114 declare double @llvm.log.f64(double)
115 define double @i_log() {
116 ; CHECK-LABEL: @i_log(
117 ; CHECK-NEXT: ret double 0.000000e+00
119 %res = tail call fast double @llvm.log.f64(double 1.0)
123 declare float @log2f(float) #0
124 define float @f_log2f() {
125 ; CHECK-LABEL: @f_log2f(
126 ; CHECK-NEXT: ret float 0.000000e+00
128 %res = tail call fast float @log2f(float 1.0)
132 declare float @llvm.log2.f32(float)
133 define float @i_log2f() {
134 ; CHECK-LABEL: @i_log2f(
135 ; CHECK-NEXT: ret float 0.000000e+00
137 %res = tail call fast float @llvm.log2.f32(float 1.0)
141 declare double @log10(double) #0
142 define double @f_log10() {
143 ; CHECK-LABEL: @f_log10(
144 ; CHECK-NEXT: ret double 0.000000e+00
146 %res = tail call fast double @log10(double 1.0)
150 declare float @sinf(float) #0
151 define float @f_sinf() {
152 ; CHECK-LABEL: @f_sinf(
153 ; CHECK-NEXT: ret float 0x3FEAED54{{.+}}
155 %res = tail call fast float @sinf(float 1.0)
159 declare double @sinh(double) #0
160 define double @f_sinh() {
161 ; CHECK-LABEL: @f_sinh(
162 ; CHECK-NEXT: ret double 0x3FF2CD9F{{.+}}
164 %res = tail call fast double @sinh(double 1.0)
168 declare float @sqrtf(float) #0
169 define float @f_sqrtf() {
170 ; CHECK-LABEL: @f_sqrtf(
171 ; CHECK-NEXT: ret float 1.000000e+00
173 %res = tail call fast float @sqrtf(float 1.0)
177 declare double @tan(double) #0
178 define double @f_tan() {
179 ; CHECK-LABEL: @f_tan(
180 ; CHECK-NEXT: ret double 0x3FF8EB24{{.+}}
182 %res = tail call fast double @tan(double 1.0)
186 declare float @tanhf(float) #0
187 define float @f_tanhf() {
188 ; CHECK-LABEL: @f_tanhf(
189 ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @tanhf(float 1.000000e+00)
190 ; CHECK-NEXT: ret float 0x3FE85EFA{{.+}}
192 %res = tail call fast float @tanhf(float 1.0)
196 attributes #0 = { nofree nounwind willreturn }