Evan's patch to avoid FPreg->intreg copy for cvt; store to mem
[oota-llvm.git] / test / CodeGen / ARM / fptoint.ll
1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 > %t
2 ; RUN: not grep fmrs %t
3
4 @i = weak global i32 0          ; <i32*> [#uses=2]
5 @u = weak global i32 0          ; <i32*> [#uses=2]
6
7 define void @foo5(float %x) {
8 entry:
9         %tmp1 = fptosi float %x to i32          ; <i32> [#uses=1]
10         store i32 %tmp1, i32* @i
11         ret void
12 }
13
14 define void @foo6(float %x) {
15 entry:
16         %tmp1 = fptoui float %x to i32          ; <i32> [#uses=1]
17         store i32 %tmp1, i32* @u
18         ret void
19 }
20
21 define void @foo7(double %x) {
22 entry:
23         %tmp1 = fptosi double %x to i32         ; <i32> [#uses=1]
24         store i32 %tmp1, i32* @i
25         ret void
26 }
27
28 define void @foo8(double %x) {
29 entry:
30         %tmp1 = fptoui double %x to i32         ; <i32> [#uses=1]
31         store i32 %tmp1, i32* @u
32         ret void
33 }