New test case.
[oota-llvm.git] / test / CodeGen / ARM / fpcmp.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t
2 ; RUN: grep movmi %t
3 ; RUN: grep moveq %t
4 ; RUN: grep movgt %t
5 ; RUN: grep movge %t
6 ; RUN: grep movne %t
7 ; RUN: grep fcmped %t | wc -l | grep 1
8 ; RUN: grep fcmpes %t | wc -l | grep 6
9
10 int %f1(float %a) {
11 entry:
12         %tmp = setlt float %a, 1.000000e+00             ; <bool> [#uses=1]
13         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
14         ret int %tmp
15 }
16
17 int %f2(float %a) {
18 entry:
19         %tmp = seteq float %a, 1.000000e+00             ; <bool> [#uses=1]
20         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
21         ret int %tmp
22 }
23
24 int %f3(float %a) {
25 entry:
26         %tmp = setgt float %a, 1.000000e+00             ; <bool> [#uses=1]
27         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
28         ret int %tmp
29 }
30
31 int %f4(float %a) {
32 entry:
33         %tmp = setge float %a, 1.000000e+00             ; <bool> [#uses=1]
34         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
35         ret int %tmp
36 }
37
38 int %f5(float %a) {
39 entry:
40         %tmp = setle float %a, 1.000000e+00             ; <bool> [#uses=1]
41         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
42         ret int %tmp
43 }
44
45 int %f6(float %a) {
46 entry:
47         %tmp = setne float %a, 1.000000e+00             ; <bool> [#uses=1]
48         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
49         ret int %tmp
50 }
51
52 int %g1(double %a) {
53 entry:
54         %tmp = setlt double %a, 1.000000e+00            ; <bool> [#uses=1]
55         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
56         ret int %tmp
57 }