1 ; RUN: llc < %s -march=xcore | FileCheck %s
2 declare double @llvm.cos.f64(double)
3 declare double @llvm.exp.f64(double)
4 declare double @llvm.exp2.f64(double)
5 declare double @llvm.log.f64(double)
6 declare double @llvm.log10.f64(double)
7 declare double @llvm.log2.f64(double)
8 declare double @llvm.pow.f64(double, double)
9 declare double @llvm.powi.f64.i32(double, i32)
10 declare double @llvm.sin.f64(double)
11 declare double @llvm.sqrt.f64(double)
13 define double @cos(double %F) {
16 %result = call double @llvm.cos.f64(double %F)
20 declare float @llvm.cos.f32(float)
24 define float @cosf(float %F) {
25 %result = call float @llvm.cos.f32(float %F)
29 define double @exp(double %F) {
32 %result = call double @llvm.exp.f64(double %F)
36 declare float @llvm.exp.f32(float)
38 define float @expf(float %F) {
41 %result = call float @llvm.exp.f32(float %F)
45 define double @exp2(double %F) {
48 %result = call double @llvm.exp2.f64(double %F)
52 declare float @llvm.exp2.f32(float)
54 define float @exp2f(float %F) {
57 %result = call float @llvm.exp2.f32(float %F)
61 define double @log(double %F) {
64 %result = call double @llvm.log.f64(double %F)
68 declare float @llvm.log.f32(float)
70 define float @logf(float %F) {
73 %result = call float @llvm.log.f32(float %F)
77 define double @log10(double %F) {
80 %result = call double @llvm.log10.f64(double %F)
84 declare float @llvm.log10.f32(float)
86 define float @log10f(float %F) {
87 ; CHECK-LABEL: log10f:
89 %result = call float @llvm.log10.f32(float %F)
93 define double @log2(double %F) {
96 %result = call double @llvm.log2.f64(double %F)
100 declare float @llvm.log2.f32(float)
102 define float @log2f(float %F) {
103 ; CHECK-LABEL: log2f:
105 %result = call float @llvm.log2.f32(float %F)
109 define double @pow(double %F, double %power) {
112 %result = call double @llvm.pow.f64(double %F, double %power)
116 declare float @llvm.pow.f32(float, float)
118 define float @powf(float %F, float %power) {
121 %result = call float @llvm.pow.f32(float %F, float %power)
125 define double @powi(double %F, i32 %power) {
127 ; CHECK: bl __powidf2
128 %result = call double @llvm.powi.f64.i32(double %F, i32 %power)
132 declare float @llvm.powi.f32.i32(float, i32)
134 define float @powif(float %F, i32 %power) {
135 ; CHECK-LABEL: powif:
136 ; CHECK: bl __powisf2
137 %result = call float @llvm.powi.f32.i32(float %F, i32 %power)
141 define double @sin(double %F) {
144 %result = call double @llvm.sin.f64(double %F)
148 declare float @llvm.sin.f32(float)
150 define float @sinf(float %F) {
153 %result = call float @llvm.sin.f32(float %F)
157 define double @sqrt(double %F) {
160 %result = call double @llvm.sqrt.f64(double %F)
164 declare float @llvm.sqrt.f32(float)
166 define float @sqrtf(float %F) {
167 ; CHECK-LABEL: sqrtf:
169 %result = call float @llvm.sqrt.f32(float %F)