blob: 038dd42e2dc4235b815d81c17246c438880ed24c [file] [log] [blame]
Reid Spencereb1d74e2007-04-16 17:36:08 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t
Dan Gohman28beeea2007-08-15 13:36:28 +00002; RUN: grep fmsr %t | count 4
Reid Spencereb1d74e2007-04-16 17:36:08 +00003; RUN: grep fsitos %t
Dan Gohman28beeea2007-08-15 13:36:28 +00004; RUN: grep fmrs %t | count 2
Reid Spencereb1d74e2007-04-16 17:36:08 +00005; RUN: grep fsitod %t
Dan Gohman28beeea2007-08-15 13:36:28 +00006; RUN: grep fmrrd %t | count 5
7; RUN: grep fmdrr %t | count 2
Reid Spencereb1d74e2007-04-16 17:36:08 +00008; RUN: grep fldd %t
Reid Spencereb1d74e2007-04-16 17:36:08 +00009; RUN: grep fuitod %t
10; RUN: grep fuitos %t
11; RUN: grep 1065353216 %t
Evan Cheng02b985c2007-01-19 09:20:23 +000012
13float %f(int %a) {
14entry:
15 %tmp = cast int %a to float ; <float> [#uses=1]
16 ret float %tmp
17}
18
19double %g(int %a) {
20entry:
21 %tmp = cast int %a to double ; <double> [#uses=1]
22 ret double %tmp
23}
24
25double %uint_to_double(uint %a) {
26entry:
27 %tmp = cast uint %a to double
28 ret double %tmp
29}
30
31float %uint_to_float(uint %a) {
32entry:
33 %tmp = cast uint %a to float
34 ret float %tmp
35}
Rafael Espindola27185192006-09-29 21:20:16 +000036
Rafael Espindolae5bbd6d2006-10-07 14:24:52 +000037
Rafael Espindola5aca9272006-10-07 14:03:39 +000038double %h(double* %v) {
39entry:
40 %tmp = load double* %v ; <double> [#uses=1]
41 ret double %tmp
42}
43
Reid Spencer90850432007-01-30 16:16:01 +000044float %h2() {
Rafael Espindolacd71da52006-10-03 17:27:58 +000045entry:
46 ret float 1.000000e+00
47}
Rafael Espindolaa2845842006-10-05 16:48:49 +000048
49double %f2(double %a) {
50 ret double %a
51}
Rafael Espindola4a408d42006-10-06 12:50:22 +000052
Rafael Espindola614057b2006-10-06 19:10:05 +000053void %f3() {
54entry:
55 %tmp = call double %f5() ; <double> [#uses=1]
56 call void %f4(double %tmp )
57 ret void
Rafael Espindola4a408d42006-10-06 12:50:22 +000058}
Rafael Espindola614057b2006-10-06 19:10:05 +000059
Rafael Espindola4a408d42006-10-06 12:50:22 +000060declare void %f4(double)
Rafael Espindola614057b2006-10-06 19:10:05 +000061declare double %f5()