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 afn flag specified per-function
19 define float @cosf_f32(float %a) {
20 ; CHECK-LABEL: cosf_f32
24 %0 = tail call afn float @llvm.cos.f32(float %a)
28 ; With afn flag specified per-function
29 define float @expf_f32(float %a) {
30 ; CHECK-LABEL: expf_f32
34 %0 = tail call afn float @llvm.exp.f32(float %a)
38 ; With afn flag specified per-function
39 define float @log10f_f32(float %a) {
40 ; CHECK-LABEL: log10f_f32
44 %0 = tail call afn float @llvm.log10.f32(float %a)
48 ; With afn flag specified per-function
49 define float @logf_f32(float %a) {
50 ; CHECK-LABEL: logf_f32
54 %0 = tail call afn float @llvm.log.f32(float %a)
58 ; With afn flag specified per-function
59 define float @powf_f32(float %a, float %b) {
60 ; CHECK-LABEL: powf_f32
64 %0 = tail call afn float @llvm.pow.f32(float %a, float %b)
68 ; With afn flag specified per-function
69 define float @rintf_f32(float %a) {
70 ; CHECK-LABEL: rintf_f32
71 ; CHECK-NOT: bl __xl_rintf
74 %0 = tail call afn float @llvm.rint.f32(float %a)
78 ; With afn flag specified per-function
79 define float @sinf_f32(float %a) {
80 ; CHECK-LABEL: sinf_f32
84 %0 = tail call afn float @llvm.sin.f32(float %a)
88 ; With afn flag specified per-function
89 define double @cos_f64(double %a) {
90 ; CHECK-LABEL: cos_f64
94 %0 = tail call afn double @llvm.cos.f64(double %a)
98 ; With afn flag specified per-function
99 define double @exp_f64(double %a) {
100 ; CHECK-LABEL: exp_f64
104 %0 = tail call afn double @llvm.exp.f64(double %a)
108 ; With afn flag specified per-function
109 define double @log_f64(double %a) {
110 ; CHECK-LABEL: log_f64
114 %0 = tail call afn double @llvm.log.f64(double %a)
118 ; With afn flag specified per-function
119 define double @log10_f64(double %a) {
120 ; CHECK-LABEL: log10_f64
124 %0 = tail call afn double @llvm.log10.f64(double %a)
128 ; With afn flag specified per-function
129 define double @pow_f64(double %a, double %b) {
130 ; CHECK-LABEL: pow_f64
134 %0 = tail call afn double @llvm.pow.f64(double %a, double %b)
138 ; With afn flag specified per-function
139 define double @sin_f64(double %a) {
140 ; CHECK-LABEL: sin_f64
144 %0 = tail call afn double @llvm.sin.f64(double %a)