add FSTD and FSTS
[oota-llvm.git] / test / CodeGen / ARM / fp.ll
1 ; RUN: llvm-as < %s | llc -march=arm &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep fmsr  | wc -l | grep 5 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep fsitos &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep fmrs &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep fsitod &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep fmrrd | wc -l | grep 5 &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep fmdrr | wc -l | grep 3 &&
8 ; RUN: llvm-as < %s | llc -march=arm | grep fldd &&
9 ; RUN: llvm-as < %s | llc -march=arm | grep flds &&
10 ; RUN: llvm-as < %s | llc -march=arm | grep fstd &&
11 ; RUN: llvm-as < %s | llc -march=arm | grep fsts &&
12 ; RUN: llvm-as < %s | llc -march=arm | grep fuitod &&
13 ; RUN: llvm-as < %s | llc -march=arm | grep fuitos &&
14 ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216"
15
16 float %f(int %a) {
17 entry:
18         %tmp = cast int %a to float             ; <float> [#uses=1]
19         ret float %tmp
20 }
21
22 double %g(int %a) {
23 entry:
24         %tmp = cast int %a to double            ; <double> [#uses=1]
25         ret double %tmp
26 }
27
28 double %uint_to_double(uint %a) {
29 entry:
30         %tmp = cast uint %a to double
31         ret double %tmp
32 }
33
34 float %uint_to_float(uint %a) {
35 entry:
36         %tmp = cast uint %a to float
37         ret float %tmp
38 }
39
40
41 double %h(double* %v) {
42 entry:
43         %tmp = load double* %v          ; <double> [#uses=1]
44         ret double %tmp
45 }
46
47 float %h() {
48 entry:
49         ret float 1.000000e+00
50 }
51
52 double %f2(double %a) {
53         ret double %a
54 }
55
56 void %f3() {
57 entry:
58         %tmp = call double %f5()                ; <double> [#uses=1]
59         call void %f4(double %tmp )
60         ret void
61 }
62
63 declare void %f4(double)
64 declare double %f5()
65
66 void %f6(float %a, float* %b) {
67 entry:
68         store float %a, float* %b
69         ret void
70 }
71
72 void %f7(double %a, double* %b) {
73 entry:
74         store double %a, double* %b
75         ret void
76 }