1 ; RUN: llc -enable-ppc-gen-scalar-mass -O3 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
2 ; RUN: llc -enable-ppc-gen-scalar-mass -O3 -mtriple=powerpc-ibm-aix-xcoff < %s | FileCheck %s
4 declare float @acosf (float);
5 declare float @acoshf (float);
6 declare float @asinf (float);
7 declare float @asinhf (float);
8 declare float @atan2f (float, float);
9 declare float @atanf (float);
10 declare float @atanhf (float);
11 declare float @cbrtf (float);
12 declare float @copysignf (float, float);
13 declare float @cosf (float);
14 declare float @coshf (float);
15 declare float @erfcf (float);
16 declare float @erff (float);
17 declare float @expf (float);
18 declare float @expm1f (float);
19 declare float @hypotf (float, float);
20 declare float @lgammaf (float);
21 declare float @log10f (float);
22 declare float @log1pf (float);
23 declare float @logf (float);
24 declare float @powf (float, float);
25 declare float @rintf (float);
26 declare float @sinf (float);
27 declare float @sinhf (float);
28 declare float @tanf (float);
29 declare float @tanhf (float);
30 declare double @acos (double);
31 declare double @acosh (double);
32 declare double @anint (double);
33 declare double @asin (double);
34 declare double @asinh (double);
35 declare double @atan (double);
36 declare double @atan2 (double);
37 declare double @atanh (double);
38 declare double @cbrt (double);
39 declare double @copysign (double, double);
40 declare double @cos (double);
41 declare double @cosh (double);
42 declare double @cosisin (double);
43 declare double @dnint (double);
44 declare double @erf (double);
45 declare double @erfc (double);
46 declare double @exp (double);
47 declare double @expm1 (double);
48 declare double @hypot (double, double);
49 declare double @lgamma (double);
50 declare double @log (double);
51 declare double @log10 (double);
52 declare double @log1p (double);
53 declare double @pow (double, double);
54 declare double @rsqrt (double);
55 declare double @sin (double);
56 declare double @sincos (double);
57 declare double @sinh (double);
58 declare double @sqrt (double);
59 declare double @tan (double);
60 declare double @tanh (double);
61 declare float @__acosf_finite (float);
62 declare float @__acoshf_finite (float);
63 declare float @__asinf_finite (float);
64 declare float @__atan2f_finite (float, float);
65 declare float @__atanhf_finite (float);
66 declare float @__coshf_finite (float);
67 declare float @__expf_finite (float);
68 declare float @__logf_finite (float);
69 declare float @__log10f_finite (float);
70 declare float @__powf_finite (float, float);
71 declare float @__sinhf_finite (float);
72 declare double @__acos_finite (double);
73 declare double @__acosh_finite (double);
74 declare double @__asin_finite (double);
75 declare double @__atan2_finite (double, double);
76 declare double @__atanh_finite (double);
77 declare double @__cosh_finite (double);
78 declare double @__exp_finite (double);
79 declare double @__log_finite (double);
80 declare double @__log10_finite (double);
81 declare double @__pow_finite (double, double);
82 declare double @__sinh_finite (double);
84 define float @acosf_f32(float %a) {
85 ; CHECK-LABEL: acosf_f32
86 ; CHECK: __xl_acosf_finite
89 %call = tail call nnan ninf afn nsz float @acosf(float %a)
93 define float @acoshf_f32(float %a) {
94 ; CHECK-LABEL: acoshf_f32
95 ; CHECK: __xl_acoshf_finite
98 %call = tail call nnan ninf afn nsz float @acoshf(float %a)
102 define float @asinf_f32(float %a) {
103 ; CHECK-LABEL: asinf_f32
104 ; CHECK: __xl_asinf_finite
107 %call = tail call nnan ninf afn nsz float @asinf(float %a)
111 define float @asinhf_f32(float %a) {
112 ; CHECK-LABEL: asinhf_f32
113 ; CHECK: __xl_asinhf_finite
116 %call = tail call nnan ninf afn nsz float @asinhf(float %a)
120 define float @atan2f_f32(float %a, float %b) {
121 ; CHECK-LABEL: atan2f_f32
122 ; CHECK: __xl_atan2f_finite
125 %call = tail call nnan ninf afn nsz float @atan2f(float %a, float %b)
129 define float @atanf_f32(float %a) {
130 ; CHECK-LABEL: atanf_f32
131 ; CHECK: __xl_atanf_finite
134 %call = tail call nnan ninf afn nsz float @atanf(float %a)
138 define float @atanhf_f32(float %a) {
139 ; CHECK-LABEL: atanhf_f32
140 ; CHECK: __xl_atanhf_finite
143 %call = tail call nnan ninf afn nsz float @atanhf(float %a)
147 define float @cbrtf_f32(float %a) {
148 ; CHECK-LABEL: cbrtf_f32
149 ; CHECK: __xl_cbrtf_finite
152 %call = tail call nnan ninf afn nsz float @cbrtf(float %a)
156 define float @copysignf_f32(float %a, float %b) {
157 ; CHECK-LABEL: copysignf_f32
161 %call = tail call nnan ninf afn nsz float @copysignf(float %a, float %b)
165 define float @cosf_f32(float %a) {
166 ; CHECK-LABEL: cosf_f32
167 ; CHECK: __xl_cosf_finite
170 %call = tail call nnan ninf afn nsz float @cosf(float %a)
174 define float @coshf_f32(float %a) {
175 ; CHECK-LABEL: coshf_f32
176 ; CHECK: __xl_coshf_finite
179 %call = tail call nnan ninf afn nsz float @coshf(float %a)
183 define float @erfcf_f32(float %a) {
184 ; CHECK-LABEL: erfcf_f32
185 ; CHECK: __xl_erfcf_finite
188 %call = tail call nnan ninf afn nsz float @erfcf(float %a)
192 define float @erff_f32(float %a) {
193 ; CHECK-LABEL: erff_f32
194 ; CHECK: __xl_erff_finite
197 %call = tail call nnan ninf afn nsz float @erff(float %a)
201 define float @expf_f32(float %a) {
202 ; CHECK-LABEL: expf_f32
203 ; CHECK: __xl_expf_finite
206 %call = tail call nnan ninf afn nsz float @expf(float %a)
210 define float @expm1f_f32(float %a) {
211 ; CHECK-LABEL: expm1f_f32
212 ; CHECK: __xl_expm1f_finite
215 %call = tail call nnan ninf afn nsz float @expm1f(float %a)
219 define float @hypotf_f32(float %a, float %b) {
220 ; CHECK-LABEL: hypotf_f32
221 ; CHECK: __xl_hypotf_finite
224 %call = tail call nnan ninf afn nsz float @hypotf(float %a, float %b)
228 define float @lgammaf_f32(float %a) {
229 ; CHECK-LABEL: lgammaf_f32
230 ; CHECK: __xl_lgammaf_finite
233 %call = tail call nnan ninf afn nsz float @lgammaf(float %a)
237 define float @log10f_f32(float %a) {
238 ; CHECK-LABEL: log10f_f32
239 ; CHECK: __xl_log10f_finite
242 %call = tail call nnan ninf afn nsz float @log10f(float %a)
246 define float @log1pf_f32(float %a) {
247 ; CHECK-LABEL: log1pf_f32
248 ; CHECK: __xl_log1pf_finite
251 %call = tail call nnan ninf afn nsz float @log1pf(float %a)
255 define float @logf_f32(float %a) {
256 ; CHECK-LABEL: logf_f32
257 ; CHECK: __xl_logf_finite
260 %call = tail call nnan ninf afn nsz float @logf(float %a)
264 define float @powf_f32(float %a, float %b) {
265 ; CHECK-LABEL: powf_f32
266 ; CHECK: __xl_powf_finite
269 %call = tail call nnan ninf afn nsz float @powf(float %a, float %b)
273 define float @rintf_f32(float %a) {
274 ; CHECK-LABEL: rintf_f32
275 ; CHECK-NOT: __xl_rintf_finite
278 %call = tail call nnan ninf afn nsz float @rintf(float %a)
282 define float @sinf_f32(float %a) {
283 ; CHECK-LABEL: sinf_f32
284 ; CHECK: __xl_sinf_finite
287 %call = tail call nnan ninf afn nsz float @sinf(float %a)
291 define float @sinhf_f32(float %a) {
292 ; CHECK-LABEL: sinhf_f32
293 ; CHECK: __xl_sinhf_finite
296 %call = tail call nnan ninf afn nsz float @sinhf(float %a)
300 define float @tanf_f32(float %a) {
301 ; CHECK-LABEL: tanf_f32
302 ; CHECK: __xl_tanf_finite
305 %call = tail call nnan ninf afn nsz float @tanf(float %a)
309 define float @tanhf_f32(float %a) {
310 ; CHECK-LABEL: tanhf_f32
311 ; CHECK: __xl_tanhf_finite
314 %call = tail call nnan ninf afn nsz float @tanhf(float %a)
318 define double @acos_f64(double %a) {
319 ; CHECK-LABEL: acos_f64
320 ; CHECK: __xl_acos_finite
323 %call = tail call nnan ninf afn nsz double @acos(double %a)
327 define double @acosh_f64(double %a) {
328 ; CHECK-LABEL: acosh_f64
329 ; CHECK: __xl_acosh_finite
332 %call = tail call nnan ninf afn nsz double @acosh(double %a)
336 define double @anint_f64(double %a) {
337 ; CHECK-LABEL: anint_f64
338 ; CHECK-NOT: __xl_anint_finite
341 %call = tail call nnan ninf afn nsz double @anint(double %a)
345 define double @asin_f64(double %a) {
346 ; CHECK-LABEL: asin_f64
347 ; CHECK: __xl_asin_finite
350 %call = tail call nnan ninf afn nsz double @asin(double %a)
354 define double @asinh_f64(double %a) {
355 ; CHECK-LABEL: asinh_f64
356 ; CHECK: __xl_asinh_finite
359 %call = tail call nnan ninf afn nsz double @asinh(double %a)
363 define double @atan_f64(double %a) {
364 ; CHECK-LABEL: atan_f64
365 ; CHECK: __xl_atan_finite
368 %call = tail call nnan ninf afn nsz double @atan(double %a)
372 define double @atan2_f64(double %a) {
373 ; CHECK-LABEL: atan2_f64
374 ; CHECK: __xl_atan2_finite
377 %call = tail call nnan ninf afn nsz double @atan2(double %a)
381 define double @atanh_f64(double %a) {
382 ; CHECK-LABEL: atanh_f64
383 ; CHECK: __xl_atanh_finite
386 %call = tail call nnan ninf afn nsz double @atanh(double %a)
390 define double @cbrt_f64(double %a) {
391 ; CHECK-LABEL: cbrt_f64
392 ; CHECK: __xl_cbrt_finite
395 %call = tail call nnan ninf afn nsz double @cbrt(double %a)
399 define double @copysign_f64(double %a, double %b) {
400 ; CHECK-LABEL: copysign_f64
404 %call = tail call nnan ninf afn nsz double @copysign(double %a, double %b)
408 define double @cos_f64(double %a) {
409 ; CHECK-LABEL: cos_f64
410 ; CHECK: __xl_cos_finite
413 %call = tail call nnan ninf afn nsz double @cos(double %a)
417 define double @cosh_f64(double %a) {
418 ; CHECK-LABEL: cosh_f64
419 ; CHECK: __xl_cosh_finite
422 %call = tail call nnan ninf afn nsz double @cosh(double %a)
426 define double @cosisin_f64(double %a) {
427 ; CHECK-LABEL: cosisin_f64
428 ; CHECK-NOT: __xl_cosisin_finite
431 %call = tail call nnan ninf afn nsz double @cosisin(double %a)
435 define double @dnint_f64(double %a) {
436 ; CHECK-LABEL: dnint_f64
437 ; CHECK-NOT: __xl_dnint_finite
440 %call = tail call nnan ninf afn nsz double @dnint(double %a)
444 define double @erf_f64(double %a) {
445 ; CHECK-LABEL: erf_f64
446 ; CHECK: __xl_erf_finite
449 %call = tail call nnan ninf afn nsz double @erf(double %a)
453 define double @erfc_f64(double %a) {
454 ; CHECK-LABEL: erfc_f64
455 ; CHECK: __xl_erfc_finite
458 %call = tail call nnan ninf afn nsz double @erfc(double %a)
462 define double @exp_f64(double %a) {
463 ; CHECK-LABEL: exp_f64
464 ; CHECK: __xl_exp_finite
467 %call = tail call nnan ninf afn nsz double @exp(double %a)
471 define double @expm1_f64(double %a) {
472 ; CHECK-LABEL: expm1_f64
473 ; CHECK: __xl_expm1_finite
476 %call = tail call nnan ninf afn nsz double @expm1(double %a)
480 define double @hypot_f64(double %a, double %b) {
481 ; CHECK-LABEL: hypot_f64
482 ; CHECK: __xl_hypot_finite
485 %call = tail call nnan ninf afn nsz double @hypot(double %a, double %b)
489 define double @lgamma_f64(double %a) {
490 ; CHECK-LABEL: lgamma_f64
491 ; CHECK: __xl_lgamma_finite
494 %call = tail call nnan ninf afn nsz double @lgamma(double %a)
498 define double @log_f64(double %a) {
499 ; CHECK-LABEL: log_f64
500 ; CHECK: __xl_log_finite
503 %call = tail call nnan ninf afn nsz double @log(double %a)
507 define double @log10_f64(double %a) {
508 ; CHECK-LABEL: log10_f64
509 ; CHECK: __xl_log10_finite
512 %call = tail call nnan ninf afn nsz double @log10(double %a)
516 define double @log1p_f64(double %a) {
517 ; CHECK-LABEL: log1p_f64
518 ; CHECK: __xl_log1p_finite
521 %call = tail call nnan ninf afn nsz double @log1p(double %a)
525 define double @pow_f64(double %a, double %b) {
526 ; CHECK-LABEL: pow_f64
527 ; CHECK: __xl_pow_finite
530 %call = tail call nnan ninf afn nsz double @pow(double %a, double %b)
534 define double @rsqrt_f64(double %a) {
535 ; CHECK-LABEL: rsqrt_f64
536 ; CHECK: __xl_rsqrt_finite
539 %call = tail call nnan ninf afn nsz double @rsqrt(double %a)
543 define double @sin_f64(double %a) {
544 ; CHECK-LABEL: sin_f64
545 ; CHECK: __xl_sin_finite
548 %call = tail call nnan ninf afn nsz double @sin(double %a)
552 define double @sincos_f64(double %a) {
553 ; CHECK-LABEL: sincos_f64
554 ; CHECK-NOT: __xl_sincos_finite
557 %call = tail call nnan ninf afn nsz double @sincos(double %a)
561 define double @sinh_f64(double %a) {
562 ; CHECK-LABEL: sinh_f64
563 ; CHECK: __xl_sinh_finite
566 %call = tail call nnan ninf afn nsz double @sinh(double %a)
570 define double @sqrt_f64(double %a) {
571 ; CHECK-LABEL: sqrt_f64
572 ; CHECK: __xl_sqrt_finite
575 %call = tail call nnan ninf afn nsz double @sqrt(double %a)
579 define double @tan_f64(double %a) {
580 ; CHECK-LABEL: tan_f64
581 ; CHECK: __xl_tan_finite
584 %call = tail call nnan ninf afn nsz double @tan(double %a)
588 define double @tanh_f64(double %a) {
589 ; CHECK-LABEL: tanh_f64
590 ; CHECK: __xl_tanh_finite
593 %call = tail call nnan ninf afn nsz double @tanh(double %a)
597 define float @__acosf_finite_f32(float %a) {
598 ; CHECK-LABEL: __acosf_finite_f32
599 ; CHECK: __xl_acosf_finite
602 %call = tail call nnan ninf afn nsz float @__acosf_finite(float %a)
606 define float @__acoshf_finite_f32(float %a) {
607 ; CHECK-LABEL: __acoshf_finite_f32
608 ; CHECK: __xl_acoshf_finite
611 %call = tail call nnan ninf afn nsz float @__acoshf_finite(float %a)
615 define float @__asinf_finite_f32(float %a) {
616 ; CHECK-LABEL: __asinf_finite_f32
617 ; CHECK: __xl_asinf_finite
620 %call = tail call nnan ninf afn nsz float @__asinf_finite(float %a)
624 define float @__atan2f_finite_f32(float %a, float %b) {
625 ; CHECK-LABEL: __atan2f_finite_f32
626 ; CHECK: __xl_atan2f_finite
629 %call = tail call nnan ninf afn nsz float @__atan2f_finite(float %a, float %b)
633 define float @__atanhf_finite_f32(float %a) {
634 ; CHECK-LABEL: __atanhf_finite_f32
635 ; CHECK: __xl_atanhf_finite
638 %call = tail call nnan ninf afn nsz float @__atanhf_finite(float %a)
642 define float @__coshf_finite_f32(float %a) {
643 ; CHECK-LABEL: __coshf_finite_f32
644 ; CHECK: __xl_coshf_finite
647 %call = tail call nnan ninf afn nsz float @__coshf_finite(float %a)
651 define float @__expf_finite_f32(float %a) {
652 ; CHECK-LABEL: __expf_finite_f32
653 ; CHECK: __xl_expf_finite
656 %call = tail call nnan ninf afn nsz float @__expf_finite(float %a)
660 define float @__logf_finite_f32(float %a) {
661 ; CHECK-LABEL: __logf_finite_f32
662 ; CHECK: __xl_logf_finite
665 %call = tail call nnan ninf afn nsz float @__logf_finite(float %a)
669 define float @__log10f_finite_f32(float %a) {
670 ; CHECK-LABEL: __log10f_finite_f32
671 ; CHECK: __xl_log10f_finite
674 %call = tail call nnan ninf afn nsz float @__log10f_finite(float %a)
678 define float @__powf_finite_f32(float %a, float %b) {
679 ; CHECK-LABEL: __powf_finite_f32
680 ; CHECK: __xl_powf_finite
683 %call = tail call nnan ninf afn nsz float @__powf_finite(float %a, float %b)
687 define float @__sinhf_finite_f32(float %a) {
688 ; CHECK-LABEL: __sinhf_finite_f32
689 ; CHECK: __xl_sinhf_finite
692 %call = tail call nnan ninf afn nsz float @__sinhf_finite(float %a)
696 define double @__acos_finite_f64(double %a) {
697 ; CHECK-LABEL: __acos_finite_f64
698 ; CHECK: __xl_acos_finite
701 %call = tail call nnan ninf afn nsz double @__acos_finite(double %a)
705 define double @__acosh_finite_f64(double %a) {
706 ; CHECK-LABEL: __acosh_finite_f64
707 ; CHECK: __xl_acosh_finite
710 %call = tail call nnan ninf afn nsz double @__acosh_finite(double %a)
714 define double @__asin_finite_f64(double %a) {
715 ; CHECK-LABEL: __asin_finite_f64
716 ; CHECK: __xl_asin_finite
719 %call = tail call nnan ninf afn nsz double @__asin_finite(double %a)
723 define double @__atan2_finite_f64(double %a, double %b) {
724 ; CHECK-LABEL: __atan2_finite_f64
725 ; CHECK: __xl_atan2_finite
728 %call = tail call nnan ninf afn nsz double @__atan2_finite(double %a, double %b)
732 define double @__atanh_finite_f64(double %a) {
733 ; CHECK-LABEL: __atanh_finite_f64
734 ; CHECK: __xl_atanh_finite
737 %call = tail call nnan ninf afn nsz double @__atanh_finite(double %a)
741 define double @__cosh_finite_f64(double %a) {
742 ; CHECK-LABEL: __cosh_finite_f64
743 ; CHECK: __xl_cosh_finite
746 %call = tail call nnan ninf afn nsz double @__cosh_finite(double %a)
750 define double @__exp_finite_f64(double %a) {
751 ; CHECK-LABEL: __exp_finite_f64
752 ; CHECK: __xl_exp_finite
755 %call = tail call nnan ninf afn nsz double @__exp_finite(double %a)
759 define double @__log_finite_f64(double %a) {
760 ; CHECK-LABEL: __log_finite_f64
761 ; CHECK: __xl_log_finite
764 %call = tail call nnan ninf afn nsz double @__log_finite(double %a)
768 define double @__log10_finite_f64(double %a) {
769 ; CHECK-LABEL: __log10_finite_f64
770 ; CHECK: __xl_log10_finite
773 %call = tail call nnan ninf afn nsz double @__log10_finite(double %a)
777 define double @__pow_finite_f64(double %a, double %b) {
778 ; CHECK-LABEL: __pow_finite_f64
779 ; CHECK: __xl_pow_finite
782 %call = tail call nnan ninf afn nsz double @__pow_finite(double %a, double %b)
786 define double @__sinh_finite_f64(double %a) {
787 ; CHECK-LABEL: __sinh_finite_f64
788 ; CHECK: __xl_sinh_finite
791 %call = tail call nnan ninf afn nsz double @__sinh_finite(double %a)