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 @llvm.cos.f32(float)
5 declare float @llvm.exp.f32(float)
6 declare float @llvm.log10.f32(float)
7 declare float @llvm.log.f32(float)
8 declare float @llvm.pow.f32(float, float)
9 declare float @llvm.rint.f32(float)
10 declare float @llvm.sin.f32(float)
11 declare double @llvm.cos.f64(double)
12 declare double @llvm.exp.f64(double)
13 declare double @llvm.log.f64(double)
14 declare double @llvm.log10.f64(double)
15 declare double @llvm.pow.f64(double, double)
16 declare double @llvm.sin.f64(double)
18 ; With fast-math flag specified per-function
19 define float @cosf_f32(float %a) {
20 ; CHECK-LABEL: cosf_f32
21 ; CHECK: __xl_cosf_finite
24 %0 = tail call nnan ninf afn nsz float @llvm.cos.f32(float %a)
28 ; With fast-math flag specified per-function
29 define float @expf_f32(float %a) {
30 ; CHECK-LABEL: expf_f32
31 ; CHECK: __xl_expf_finite
34 %0 = tail call nnan ninf afn nsz float @llvm.exp.f32(float %a)
38 ; With fast-math flag specified per-function
39 define float @log10f_f32(float %a) {
40 ; CHECK-LABEL: log10f_f32
41 ; CHECK: __xl_log10f_finite
44 %0 = tail call nnan ninf afn nsz float @llvm.log10.f32(float %a)
48 ; With fast-math flag specified per-function
49 define float @logf_f32(float %a) {
50 ; CHECK-LABEL: logf_f32
51 ; CHECK: __xl_logf_finite
54 %0 = tail call nnan ninf afn nsz float @llvm.log.f32(float %a)
58 ; With fast-math flag specified per-function
59 define float @powf_f32(float %a, float %b) {
60 ; CHECK-LABEL: powf_f32
61 ; CHECK: __xl_powf_finite
64 %0 = tail call nnan ninf afn nsz float @llvm.pow.f32(float %a, float %b)
68 ; With fast-math flag specified per-function
69 define float @rintf_f32(float %a) {
70 ; CHECK-LABEL: rintf_f32
71 ; CHECK-NOT: bl __xl_rintf_finite
74 %0 = tail call nnan ninf afn nsz float @llvm.rint.f32(float %a)
78 ; With fast-math flag specified per-function
79 define float @sinf_f32(float %a) {
80 ; CHECK-LABEL: sinf_f32
81 ; CHECK: __xl_sinf_finite
84 %0 = tail call nnan ninf afn nsz float @llvm.sin.f32(float %a)
88 ; With fast-math flag specified per-function
89 define double @cos_f64(double %a) {
90 ; CHECK-LABEL: cos_f64
91 ; CHECK: __xl_cos_finite
94 %0 = tail call nnan ninf afn nsz double @llvm.cos.f64(double %a)
98 ; With fast-math flag specified per-function
99 define double @exp_f64(double %a) {
100 ; CHECK-LABEL: exp_f64
101 ; CHECK: __xl_exp_finite
104 %0 = tail call nnan ninf afn nsz double @llvm.exp.f64(double %a)
108 ; With fast-math flag specified per-function
109 define double @log_f64(double %a) {
110 ; CHECK-LABEL: log_f64
111 ; CHECK: __xl_log_finite
114 %0 = tail call nnan ninf afn nsz double @llvm.log.f64(double %a)
118 ; With fast-math flag specified per-function
119 define double @log10_f64(double %a) {
120 ; CHECK-LABEL: log10_f64
121 ; CHECK: __xl_log10_finite
124 %0 = tail call nnan ninf afn nsz double @llvm.log10.f64(double %a)
128 ; With fast-math flag specified per-function
129 define double @pow_f64(double %a, double %b) {
130 ; CHECK-LABEL: pow_f64
131 ; CHECK: __xl_pow_finite
134 %0 = tail call nnan ninf afn nsz double @llvm.pow.f64(double %a, double %b)
138 ; With fast-math flag specified per-function
139 define double @sin_f64(double %a) {
140 ; CHECK-LABEL: sin_f64
141 ; CHECK: __xl_sin_finite
144 %0 = tail call nnan ninf afn nsz double @llvm.sin.f64(double %a)