1 ; RUN: llc -mtriple=armv7k-apple-watchos2.0 < %s | FileCheck %s
3 define arm_aapcs_vfpcc float @t1(float %a, float %b) {
8 %a.addr = alloca float, align 4
9 %b.addr = alloca float, align 4
10 store float %a, float* %a.addr, align 4
11 store float %b, float* %b.addr, align 4
12 %0 = load float, float* %a.addr, align 4
13 %1 = load float, float* %b.addr, align 4
14 %add = fadd float %0, %1
18 define arm_aapcs_vfpcc double @t2(double %a, double %b) {
23 %a.addr = alloca double, align 8
24 %b.addr = alloca double, align 8
25 store double %a, double* %a.addr, align 8
26 store double %b, double* %b.addr, align 8
27 %0 = load double, double* %a.addr, align 8
28 %1 = load double, double* %b.addr, align 8
29 %add = fadd double %0, %1
33 define arm_aapcs_vfpcc i64 @t3(double %ti) {
37 ; CHECK: bl ___fixunsdfdi
38 %conv = fptoui double %ti to i64
42 define arm_aapcs_vfpcc i64 @t4(double %ti) {
46 ; CHECK: bl ___fixdfdi
47 %conv = fptosi double %ti to i64
51 define arm_aapcs_vfpcc double @t5(i64 %ti) {
54 ; CHECK: bl ___floatundidf
57 %conv = uitofp i64 %ti to double
61 define arm_aapcs_vfpcc double @t6(i64 %ti) {
64 ; CHECK: bl ___floatdidf
67 %conv = sitofp i64 %ti to double
71 define arm_aapcs_vfpcc float @t7(i64 %ti) {
74 ; CHECK: bl ___floatundisf
77 %conv = uitofp i64 %ti to float
81 define arm_aapcs_vfpcc float @t8(i64 %ti) {
84 ; CHECK: bl ___floatdisf
87 %conv = sitofp i64 %ti to float
91 define arm_aapcs_vfpcc double @t9(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, float %a, float %b) {
96 %add = fadd float %a, %b
97 %conv = fpext float %add to double
101 define arm_aapcs_vfpcc double @t10(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %a, float %b, double %c) {
106 %add = fadd double %a, %c
110 define arm_aapcs_vfpcc float @t11(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, float %a, double %b, float %c) {
114 %add = fadd float %a, %c
118 define arm_aapcs_vfpcc double @t12(double %a, double %b) {
122 %add = fadd double %a, %b
123 %sub = fsub double %a, %b
124 %call = tail call arm_aapcs_vfpcc double @x(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double %add, float 0.000000e+00, double %sub)
128 define arm_aapcs_vfpcc double @t13(double %x) {
132 ; CHECK: bl ___sincos_stret
133 %call = tail call arm_aapcs_vfpcc double @cos(double %x)
134 %call1 = tail call arm_aapcs_vfpcc double @sin(double %x)
135 %mul = fmul double %call, %call1
139 define arm_aapcs_vfpcc double @t14(double %x) {
143 %__exp10 = tail call double @__exp10(double %x) #1
147 declare arm_aapcs_vfpcc double @x(double, double, double, double, double, double, double, float, double)
148 declare arm_aapcs_vfpcc double @cos(double) #0
149 declare arm_aapcs_vfpcc double @sin(double) #0
150 declare double @__exp10(double)
152 attributes #0 = { readnone }
153 attributes #1 = { readonly }