fix some fp condition codes
[oota-llvm.git] / test / CodeGen / ARM / fpcmp.ll
1 ; RUN: llvm-as < %s | llc -march=arm &&
2 ; RUN: llvm-as < %s | llc -march=arm  | grep movmi &&
3 ; RUN: llvm-as < %s | llc -march=arm  | grep moveq &&
4 ; RUN: llvm-as < %s | llc -march=arm  | grep movgt &&
5 ; RUN: llvm-as < %s | llc -march=arm  | grep movge &&
6 ; RUN: llvm-as < %s | llc -march=arm  | grep movls &&
7 ; RUN: llvm-as < %s | llc -march=arm  | grep fcmps &&
8 ; RUN: llvm-as < %s | llc -march=arm  | grep fcmpd
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 }
58
59 int %g2(double %a) {
60 entry:
61         %tmp = setne double %a, 1.000000e+00            ; <bool> [#uses=1]
62         %tmp = cast bool %tmp to int            ; <int> [#uses=1]
63         ret int %tmp
64 }