blob: 186d20a3331ed79a06ced14c78184b7b02cd35fe [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: grep fmsr %t | count 4
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003; RUN: grep fsitos %t
Dan Gohman8c89a502007-08-15 13:36:28 +00004; RUN: grep fmrs %t | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005; RUN: grep fsitod %t
Dan Gohman8c89a502007-08-15 13:36:28 +00006; RUN: grep fmrrd %t | count 5
7; RUN: grep fmdrr %t | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008; RUN: grep fldd %t
9; RUN: grep fuitod %t
10; RUN: grep fuitos %t
11; RUN: grep 1065353216 %t
Tanya Lattner8b074702007-11-28 04:57:00 +000012; XFAIL: *
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013
14float %f(int %a) {
15entry:
16 %tmp = cast int %a to float ; <float> [#uses=1]
17 ret float %tmp
18}
19
20double %g(int %a) {
21entry:
22 %tmp = cast int %a to double ; <double> [#uses=1]
23 ret double %tmp
24}
25
26double %uint_to_double(uint %a) {
27entry:
28 %tmp = cast uint %a to double
29 ret double %tmp
30}
31
32float %uint_to_float(uint %a) {
33entry:
34 %tmp = cast uint %a to float
35 ret float %tmp
36}
37
38
39double %h(double* %v) {
40entry:
41 %tmp = load double* %v ; <double> [#uses=1]
42 ret double %tmp
43}
44
45float %h2() {
46entry:
47 ret float 1.000000e+00
48}
49
50double %f2(double %a) {
51 ret double %a
52}
53
54void %f3() {
55entry:
56 %tmp = call double %f5() ; <double> [#uses=1]
57 call void %f4(double %tmp )
58 ret void
59}
60
61declare void %f4(double)
62declare double %f5()