blob: 41168acc42a55f8d7249504d8b3d308f5bb63ee5 [file] [log] [blame]
Dan Gohman8c89a502007-08-15 13:36:28 +00001; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fmrs | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrrd
3
4@i = weak global i32 0 ; <i32*> [#uses=2]
5@u = weak global i32 0 ; <i32*> [#uses=2]
6
7define i32 @foo1(float *%x) {
8 %tmp1 = load float* %x
9 %tmp2 = bitcast float %tmp1 to i32
10 ret i32 %tmp2
11}
12
13define i64 @foo2(double *%x) {
14 %tmp1 = load double* %x
15 %tmp2 = bitcast double %tmp1 to i64
16 ret i64 %tmp2
17}
18
19define void @foo5(float %x) {
20 %tmp1 = fptosi float %x to i32
21 store i32 %tmp1, i32* @i
22 ret void
23}
24
25define void @foo6(float %x) {
26 %tmp1 = fptoui float %x to i32
27 store i32 %tmp1, i32* @u
28 ret void
29}
30
31define void @foo7(double %x) {
32 %tmp1 = fptosi double %x to i32
33 store i32 %tmp1, i32* @i
34 ret void
35}
36
37define void @foo8(double %x) {
38 %tmp1 = fptoui double %x to i32
39 store i32 %tmp1, i32* @u
40 ret void
41}
42
43define void @foo9(double %x) {
44 %tmp = fptoui double %x to i16
45 store i16 %tmp, i16* null
46 ret void
47}