1 ; RUN: opt < %s -passes=instcombine -S -mtriple x86_64-unknown-linux-gnu | FileCheck %s --check-prefixes=CHECK,LINUX,ISC99
2 ; RUN: opt < %s -passes=instcombine -S -mtriple x86_64-pc-win32 | FileCheck %s --check-prefixes=CHECK,ISC99
3 ; RUN: opt < %s -passes=instcombine -S -mtriple x86_64-pc-windows-msvc16 | FileCheck %s --check-prefixes=CHECK,MS64,ISC89
4 ; RUN: opt < %s -passes=instcombine -S -mtriple i386-pc-windows-msvc | FileCheck %s --check-prefixes=CHECK,ISC99
5 ; RUN: opt < %s -passes=instcombine -S -mtriple i686-pc-windows-msvc17 | FileCheck %s --check-prefixes=CHECK,MS32,ISC89
7 ; Check for and against shrinkage when using the
8 ; unsafe-fp-math function attribute on a math lib
9 ; function. This optimization may be overridden by
10 ; the -enable-double-float-shrink option.
11 ; PR17850: http://llvm.org/bugs/show_bug.cgi?id=17850
13 define float @acos_test1(float %f) {
14 ; CHECK-LABEL: @acos_test1(
15 ; LINUX-NEXT: [[ACOSF:%.*]] = call fast float @acosf(float [[F:%.*]])
16 ; LINUX-NEXT: ret float [[ACOSF]]
17 ; MS32: [[ACOSF:%.*]] = call fast double @acos(double [[F:%.*]])
18 ; MS64-NEXT: [[ACOSF:%.*]] = call fast float @acosf(float [[F:%.*]])
20 %conv = fpext float %f to double
21 %call = call fast double @acos(double %conv)
22 %conv1 = fptrunc double %call to float
26 define double @acos_test2(float %f) {
27 ; CHECK-LABEL: @acos_test2(
28 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
29 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @acos(double [[CONV]])
30 ; CHECK-NEXT: ret double [[CALL]]
32 %conv = fpext float %f to double
33 %call = call fast double @acos(double %conv)
37 define float @acosh_test1(float %f) {
38 ; CHECK-LABEL: @acosh_test1(
39 ; ISC99-NEXT: [[ACOSHF:%.*]] = call fast float @acoshf(float [[F:%.*]])
40 ; ISC99-NEXT: ret float [[ACOSHF]]
41 ; ISC89: [[ACOSHF:%.*]] = call fast double @acosh(double [[F:%.*]])
43 %conv = fpext float %f to double
44 %call = call fast double @acosh(double %conv)
45 %conv1 = fptrunc double %call to float
49 define double @acosh_test2(float %f) {
50 ; CHECK-LABEL: @acosh_test2(
51 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
52 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @acosh(double [[CONV]])
53 ; CHECK-NEXT: ret double [[CALL]]
55 %conv = fpext float %f to double
56 %call = call fast double @acosh(double %conv)
60 define float @asin_test1(float %f) {
61 ; CHECK-LABEL: @asin_test1(
62 ; LINUX-NEXT: [[ASINF:%.*]] = call fast float @asinf(float [[F:%.*]])
63 ; LINUX-NEXT: ret float [[ASINF]]
64 ; MS32: [[ASINF:%.*]] = call fast double @asin(double [[F:%.*]])
65 ; MS64-NEXT: [[ASINF:%.*]] = call fast float @asinf(float [[F:%.*]])
67 %conv = fpext float %f to double
68 %call = call fast double @asin(double %conv)
69 %conv1 = fptrunc double %call to float
73 define double @asin_test2(float %f) {
74 ; CHECK-LABEL: @asin_test2(
75 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
76 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @asin(double [[CONV]])
77 ; CHECK-NEXT: ret double [[CALL]]
79 %conv = fpext float %f to double
80 %call = call fast double @asin(double %conv)
84 define float @asinh_test1(float %f) {
85 ; CHECK-LABEL: @asinh_test1(
86 ; ISC99-NEXT: [[ASINHF:%.*]] = call fast float @asinhf(float [[F:%.*]])
87 ; ISC99-NEXT: ret float [[ASINHF]]
88 ; ISC89: [[ASINHF:%.*]] = call fast double @asinh(double [[F:%.*]])
90 %conv = fpext float %f to double
91 %call = call fast double @asinh(double %conv)
92 %conv1 = fptrunc double %call to float
96 define double @asinh_test2(float %f) {
97 ; CHECK-LABEL: @asinh_test2(
98 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
99 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @asinh(double [[CONV]])
100 ; CHECK-NEXT: ret double [[CALL]]
102 %conv = fpext float %f to double
103 %call = call fast double @asinh(double %conv)
107 define float @atan_test1(float %f) {
108 ; CHECK-LABEL: @atan_test1(
109 ; LINUX-NEXT: [[ATANF:%.*]] = call fast float @atanf(float [[F:%.*]])
110 ; LINUX-NEXT: ret float [[ATANF]]
111 ; MS32: [[ATANF:%.*]] = call fast double @atan(double [[F:%.*]])
112 ; MS64-NEXT: [[ATANF:%.*]] = call fast float @atanf(float [[F:%.*]])
114 %conv = fpext float %f to double
115 %call = call fast double @atan(double %conv)
116 %conv1 = fptrunc double %call to float
120 define double @atan_test2(float %f) {
121 ; CHECK-LABEL: @atan_test2(
122 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
123 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @atan(double [[CONV]])
124 ; CHECK-NEXT: ret double [[CALL]]
126 %conv = fpext float %f to double
127 %call = call fast double @atan(double %conv)
131 define float @atanh_test1(float %f) {
132 ; CHECK-LABEL: @atanh_test1(
133 ; ISC99-NEXT: [[ATANHF:%.*]] = call fast float @atanhf(float [[F:%.*]])
134 ; ISC99-NEXT: ret float [[ATANHF]]
135 ; ISC89: [[ATANHF:%.*]] = call fast double @atanh(double [[F:%.*]])
137 %conv = fpext float %f to double
138 %call = call fast double @atanh(double %conv)
139 %conv1 = fptrunc double %call to float
143 define double @atanh_test2(float %f) {
144 ; CHECK-LABEL: @atanh_test2(
145 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
146 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @atanh(double [[CONV]])
147 ; CHECK-NEXT: ret double [[CALL]]
149 %conv = fpext float %f to double
150 %call = call fast double @atanh(double %conv)
154 define float @cbrt_test1(float %f) {
155 ; CHECK-LABEL: @cbrt_test1(
156 ; ISC99-NEXT: [[CBRTF:%.*]] = call fast float @cbrtf(float [[F:%.*]])
157 ; ISC99-NEXT: ret float [[CBRTF]]
158 ; ISC89: [[CBRTF:%.*]] = call fast double @cbrt(double [[F:%.*]])
160 %conv = fpext float %f to double
161 %call = call fast double @cbrt(double %conv)
162 %conv1 = fptrunc double %call to float
166 define double @cbrt_test2(float %f) {
167 ; CHECK-LABEL: @cbrt_test2(
168 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
169 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @cbrt(double [[CONV]])
170 ; CHECK-NEXT: ret double [[CALL]]
172 %conv = fpext float %f to double
173 %call = call fast double @cbrt(double %conv)
177 define float @exp_test1(float %f) {
178 ; CHECK-LABEL: @exp_test1(
179 ; LINUX-NEXT: [[EXPF:%.*]] = call fast float @expf(float [[F:%.*]])
180 ; LINUX-NEXT: ret float [[EXPF]]
181 ; MS32: [[EXPF:%.*]] = call fast double @exp(double [[F:%.*]])
182 ; MS64-NEXT: [[EXPF:%.*]] = call fast float @expf(float [[F:%.*]])
184 %conv = fpext float %f to double
185 %call = call fast double @exp(double %conv)
186 %conv1 = fptrunc double %call to float
190 define double @exp_test2(float %f) {
191 ; CHECK-LABEL: @exp_test2(
192 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
193 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @exp(double [[CONV]])
194 ; CHECK-NEXT: ret double [[CALL]]
196 %conv = fpext float %f to double
197 %call = call fast double @exp(double %conv)
201 define float @expm1_test1(float %f) {
202 ; CHECK-LABEL: @expm1_test1(
203 ; ISC99-NEXT: [[EXPM1F:%.*]] = call fast float @expm1f(float [[F:%.*]])
204 ; ISC99-NEXT: ret float [[EXPM1F]]
205 ; ISC89: [[EXPM1F:%.*]] = call fast double @expm1(double [[F:%.*]])
207 %conv = fpext float %f to double
208 %call = call fast double @expm1(double %conv)
209 %conv1 = fptrunc double %call to float
213 define double @expm1_test2(float %f) {
214 ; CHECK-LABEL: @expm1_test2(
215 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
216 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @expm1(double [[CONV]])
217 ; CHECK-NEXT: ret double [[CALL]]
219 %conv = fpext float %f to double
220 %call = call fast double @expm1(double %conv)
224 ; exp10f() doesn't exist for this triple, so it doesn't shrink.
226 define float @exp10_test1(float %f) {
227 ; CHECK-LABEL: @exp10_test1(
228 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
229 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @exp10(double [[CONV]])
230 ; CHECK-NEXT: [[CONV1:%.*]] = fptrunc double [[CALL]] to float
231 ; CHECK-NEXT: ret float [[CONV1]]
233 %conv = fpext float %f to double
234 %call = call fast double @exp10(double %conv)
235 %conv1 = fptrunc double %call to float
239 define double @exp10_test2(float %f) {
240 ; CHECK-LABEL: @exp10_test2(
241 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
242 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @exp10(double [[CONV]])
243 ; CHECK-NEXT: ret double [[CALL]]
245 %conv = fpext float %f to double
246 %call = call fast double @exp10(double %conv)
250 define float @log_test1(float %f) {
251 ; CHECK-LABEL: @log_test1(
252 ; LINUX-NEXT: [[LOGF:%.*]] = call fast float @llvm.log.f32(float [[F:%.*]])
253 ; LINUX-NEXT: ret float [[LOGF]]
254 ; MS32: [[LOGF:%.*]] = call fast double @llvm.log.f64(double [[F:%.*]])
255 ; MS64-NEXT: [[LOGF:%.*]] = call fast float @llvm.log.f32(float [[F:%.*]])
257 %conv = fpext float %f to double
258 %call = call fast double @log(double %conv)
259 %conv1 = fptrunc double %call to float
263 define double @log_test2(float %f) {
264 ; CHECK-LABEL: @log_test2(
265 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
266 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @llvm.log.f64(double [[CONV]])
267 ; CHECK-NEXT: ret double [[CALL]]
269 %conv = fpext float %f to double
270 %call = call fast double @log(double %conv)
274 define float @log10_test1(float %f) {
275 ; CHECK-LABEL: @log10_test1(
276 ; LINUX-NEXT: [[LOG10F:%.*]] = call fast float @llvm.log10.f32(float [[F:%.*]])
277 ; LINUX-NEXT: ret float [[LOG10F]]
278 ; MS32: [[LOG10F:%.*]] = call fast double @llvm.log10.f64(double [[F:%.*]])
279 ; MS64-NEXT: [[LOG10F:%.*]] = call fast float @llvm.log10.f32(float [[F:%.*]])
281 %conv = fpext float %f to double
282 %call = call fast double @log10(double %conv)
283 %conv1 = fptrunc double %call to float
287 define double @log10_test2(float %f) {
288 ; CHECK-LABEL: @log10_test2(
289 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
290 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @llvm.log10.f64(double [[CONV]])
291 ; CHECK-NEXT: ret double [[CALL]]
293 %conv = fpext float %f to double
294 %call = call fast double @log10(double %conv)
298 define float @log1p_test1(float %f) {
299 ; CHECK-LABEL: @log1p_test1(
300 ; ISC99-NEXT: [[LOG1PF:%.*]] = call fast float @log1pf(float [[F:%.*]])
301 ; ISC99-NEXT: ret float [[LOG1PF]]
302 ; ISC89: [[LOG1PF:%.*]] = call fast double @log1p(double [[F:%.*]])
304 %conv = fpext float %f to double
305 %call = call fast double @log1p(double %conv)
306 %conv1 = fptrunc double %call to float
310 define double @log1p_test2(float %f) {
311 ; CHECK-LABEL: @log1p_test2(
312 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
313 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @log1p(double [[CONV]])
314 ; CHECK-NEXT: ret double [[CALL]]
316 %conv = fpext float %f to double
317 %call = call fast double @log1p(double %conv)
321 define float @log2_test1(float %f) {
322 ; CHECK-LABEL: @log2_test1(
323 ; ISC99-NEXT: [[LOG2F:%.*]] = call fast float @llvm.log2.f32(float [[F:%.*]])
324 ; ISC99-NEXT: ret float [[LOG2F]]
325 ; ISC89: [[LOG2F:%.*]] = call fast double @log2(double [[F:%.*]])
327 %conv = fpext float %f to double
328 %call = call fast double @log2(double %conv)
329 %conv1 = fptrunc double %call to float
333 define double @log2_test2(float %f) {
334 ; CHECK-LABEL: @log2_test2(
335 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
336 ; ISC99-NEXT: [[CALL:%.*]] = call fast double @llvm.log2.f64(double [[CONV]])
337 ; ISC89-NEXT: [[LOG2F:%.*]] = call fast double @log2(double [[F:%.*]])
338 ; CHECK-NEXT: ret double [[CALL]]
340 %conv = fpext float %f to double
341 %call = call fast double @log2(double %conv)
345 define float @logb_test1(float %f) {
346 ; CHECK-LABEL: @logb_test1(
347 ; LINUX-NEXT: [[LOGBF:%.*]] = call fast float @logbf(float [[F:%.*]])
348 ; LINUX-NEXT: ret float [[LOGBF]]
349 ; MS32: [[POWF:%.*]] = call fast double @logb(double [[F:%.*]])
350 ; MS64-NEXT: [[LOGBF:%.*]] = call fast float @_logbf(float [[F:%.*]])
352 %conv = fpext float %f to double
353 %call = call fast double @logb(double %conv)
354 %conv1 = fptrunc double %call to float
358 define double @logb_test2(float %f) {
359 ; CHECK-LABEL: @logb_test2(
360 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
361 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @logb(double [[CONV]])
362 ; CHECK-NEXT: ret double [[CALL]]
364 %conv = fpext float %f to double
365 %call = call fast double @logb(double %conv)
369 define float @pow_test1(float %f, float %g) {
370 ; CHECK-LABEL: @pow_test1(
371 ; LINUX-NEXT: [[POWF:%.*]] = call fast float @powf(float %f, float %g)
372 ; LINUX-NEXT: ret float [[POWF]]
373 ; MS32: [[POWF:%.*]] = call fast double @pow(double %df, double %dg)
374 ; MS64-NEXT: [[POWF:%.*]] = call fast float @powf(float %f, float %g)
376 %df = fpext float %f to double
377 %dg = fpext float %g to double
378 %call = call fast double @pow(double %df, double %dg)
379 %fr = fptrunc double %call to float
383 define double @pow_test2(float %f, float %g) {
384 ; CHECK-LABEL: @pow_test2(
385 ; CHECK: [[POW:%.*]] = call fast double @pow(double %df, double %dg)
386 ; CHECK-NEXT: ret double [[POW]]
388 %df = fpext float %f to double
389 %dg = fpext float %g to double
390 %call = call fast double @pow(double %df, double %dg)
394 define float @sin_test1(float %f) {
395 ; CHECK-LABEL: @sin_test1(
396 ; LINUX-NEXT: [[SINF:%.*]] = call fast float @sinf(float [[F:%.*]])
397 ; LINUX-NEXT: ret float [[SINF]]
398 ; MS32: [[SINF:%.*]] = call fast double @sin(double [[F:%.*]])
399 ; MS64-NEXT: [[SINF:%.*]] = call fast float @sinf(float [[F:%.*]])
401 %conv = fpext float %f to double
402 %call = call fast double @sin(double %conv)
403 %conv1 = fptrunc double %call to float
407 define double @sin_test2(float %f) {
408 ; CHECK-LABEL: @sin_test2(
409 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
410 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @sin(double [[CONV]])
411 ; CHECK-NEXT: ret double [[CALL]]
413 %conv = fpext float %f to double
414 %call = call fast double @sin(double %conv)
418 define float @sqrt_test1(float %f) {
419 ; CHECK-LABEL: @sqrt_test1(
420 ; LINUX-NEXT: [[SQRTF:%.*]] = call float @sqrtf(float [[F:%.*]])
421 ; LINUX-NEXT: ret float [[SQRTF]]
422 ; MS32: [[SQRTF:%.*]] = call double @sqrt(double [[F:%.*]])
423 ; MS64-NEXT: [[SQRTF:%.*]] = call float @sqrtf(float [[F:%.*]])
425 %conv = fpext float %f to double
426 %call = call double @sqrt(double %conv)
427 %conv1 = fptrunc double %call to float
431 define double @sqrt_test2(float %f) {
432 ; CHECK-LABEL: @sqrt_test2(
433 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
434 ; CHECK-NEXT: [[CALL:%.*]] = call double @sqrt(double [[CONV]])
435 ; CHECK-NEXT: ret double [[CALL]]
437 %conv = fpext float %f to double
438 %call = call double @sqrt(double %conv)
442 define float @sqrt_int_test1(float %f) {
443 ; CHECK-LABEL: @sqrt_int_test1(
444 ; LINUX-NEXT: [[TMP1:%.*]] = call float @llvm.sqrt.f32(float [[F:%.*]])
445 ; LINUX-NEXT: ret float [[TMP1]]
446 ; MS32: [[TMP1:%.*]] = call double @llvm.sqrt.f64(double [[F:%.*]])
447 ; MS64-NEXT: [[TMP1:%.*]] = call float @llvm.sqrt.f32(float [[F:%.*]])
449 %conv = fpext float %f to double
450 %call = call double @llvm.sqrt.f64(double %conv)
451 %conv1 = fptrunc double %call to float
455 define double @sqrt_int_test2(float %f) {
456 ; CHECK-LABEL: @sqrt_int_test2(
457 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
458 ; CHECK-NEXT: [[CALL:%.*]] = call double @llvm.sqrt.f64(double [[CONV]])
459 ; CHECK-NEXT: ret double [[CALL]]
461 %conv = fpext float %f to double
462 %call = call double @llvm.sqrt.f64(double %conv)
466 define float @tan_test1(float %f) {
467 ; CHECK-LABEL: @tan_test1(
468 ; LINUX-NEXT: [[TANF:%.*]] = call fast float @tanf(float [[F:%.*]])
469 ; LINUX-NEXT: ret float [[TANF]]
470 ; MS32: [[TANF:%.*]] = call fast double @tan(double [[F:%.*]])
471 ; MS64-NEXT: [[TANF:%.*]] = call fast float @tanf(float [[F:%.*]])
473 %conv = fpext float %f to double
474 %call = call fast double @tan(double %conv)
475 %conv1 = fptrunc double %call to float
479 define double @tan_test2(float %f) {
480 ; CHECK-LABEL: @tan_test2(
481 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
482 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @tan(double [[CONV]])
483 ; CHECK-NEXT: ret double [[CALL]]
485 %conv = fpext float %f to double
486 %call = call fast double @tan(double %conv)
489 define float @tanh_test1(float %f) {
490 ; CHECK-LABEL: @tanh_test1(
491 ; LINUX-NEXT: [[TANHF:%.*]] = call fast float @tanhf(float [[F:%.*]])
492 ; LINUX-NEXT: ret float [[TANHF]]
493 ; MS32: [[TANHF:%.*]] = call fast double @tanh(double [[F:%.*]])
494 ; MS64-NEXT: [[TANHF:%.*]] = call fast float @tanhf(float [[F:%.*]])
496 %conv = fpext float %f to double
497 %call = call fast double @tanh(double %conv)
498 %conv1 = fptrunc double %call to float
502 define double @tanh_test2(float %f) {
503 ; CHECK-LABEL: @tanh_test2(
504 ; CHECK-NEXT: [[CONV:%.*]] = fpext float [[F:%.*]] to double
505 ; CHECK-NEXT: [[CALL:%.*]] = call fast double @tanh(double [[CONV]])
506 ; CHECK-NEXT: ret double [[CALL]]
508 %conv = fpext float %f to double
509 %call = call fast double @tanh(double %conv)
513 ; 'arcp' on an fmax() is meaningless. This test just proves that
514 ; flags are propagated for shrunken *binary* double FP calls.
515 define float @max1(float %a, float %b) {
516 ; CHECK-LABEL: @max1(
517 ; ISC99-NEXT: [[FMAXF:%.*]] = call nsz arcp float @llvm.maxnum.f32(float [[A:%.*]], float [[B:%.*]])
518 ; ISC99-NEXT: ret float [[FMAXF]]
519 ; ISC89: [[FMAXF:%.*]] = call arcp double @fmax(double [[A:%.*]], double [[B:%.*]])
521 %c = fpext float %a to double
522 %d = fpext float %b to double
523 %e = call arcp double @fmax(double %c, double %d)
524 %f = fptrunc double %e to float
528 ; This is treated as libm 'fmin' - LLVM types do not necessarily
529 ; correspond to 'C' types, so this is not required to be "fminl".
531 define float @fake_fmin(float %a, float %b) {
532 ; CHECK-LABEL: @fake_fmin(
533 ; ISC99-NEXT: [[MIN:%.*]] = call nsz float @llvm.minnum.f32(float %a, float %b)
534 ; ISC99-NEXT: ret float [[MIN]]
536 ; ISC89-NEXT: [[C:%.*]] = fpext float [[A:%.*]] to fp128
537 ; ISC89-NEXT: [[D:%.*]] = fpext float [[B:%.*]] to fp128
538 ; ISC89-NEXT: [[E:%.*]] = call fp128 @fmin(fp128 [[C]], fp128 [[D]])
539 ; ISC89-NEXT: [[F:%.*]] = fptrunc fp128 [[E]] to float
540 ; ISC89-NEXT: ret float [[F]]
542 %c = fpext float %a to fp128
543 %d = fpext float %b to fp128
544 %e = call fp128 @fmin(fp128 %c, fp128 %d)
545 %f = fptrunc fp128 %e to float
549 declare fp128 @fmin(fp128, fp128)
551 declare double @fmax(double, double)
553 declare double @tanh(double)
554 declare double @tan(double)
556 ; sqrt is a special case: the shrinking optimization
557 ; is valid even without unsafe-fp-math.
558 declare double @sqrt(double)
559 declare double @llvm.sqrt.f64(double)
561 declare double @sin(double)
562 declare double @pow(double, double)
563 declare double @log2(double)
564 declare double @log1p(double)
565 declare double @log10(double)
566 declare double @log(double)
567 declare double @logb(double)
568 declare double @exp10(double)
569 declare double @expm1(double)
570 declare double @exp(double)
571 declare double @cbrt(double)
572 declare double @atanh(double)
573 declare double @atan(double)
574 declare double @acos(double)
575 declare double @acosh(double)
576 declare double @asin(double)
577 declare double @asinh(double)