0bfffc89b4fd5c257bfc1063b9261ca54472c0e5
[oota-llvm.git] / test / CodeGen / ARM / select.ll
1 ; RUN: llvm-as < %s | llc -march=arm &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep moveq | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep movgt | wc -l | grep 1 &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep movlt | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep movle | wc -l | grep 1 &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep movls | wc -l | grep 1 &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep movhi | wc -l | grep 1
8
9 int %f1(int %a) {
10 entry:
11         %tmp = seteq int %a, 4          ; <bool> [#uses=1]
12         %tmp1 = select bool %tmp, int 2, int 3
13         ret int %tmp1
14 }
15
16 int %f2(int %a) {
17 entry:
18         %tmp = setgt int %a, 4          ; <bool> [#uses=1]
19         %tmp1 = select bool %tmp, int 2, int 3
20         ret int %tmp1
21 }
22
23 int %f3(int %a, int %b) {
24 entry:
25         %tmp = setlt int %a, %b         ; <bool> [#uses=1]
26         %tmp1 = select bool %tmp, int 2, int 3
27         ret int %tmp1
28 }
29
30 int %f4(int %a, int %b) {
31 entry:
32         %tmp = setle int %a, %b         ; <bool> [#uses=1]
33         %tmp1 = select bool %tmp, int 2, int 3
34         ret int %tmp1
35 }
36
37 int %f5(uint %a, uint %b) {
38 entry:
39         %tmp = setle uint %a, %b                ; <bool> [#uses=1]
40         %tmp1 = select bool %tmp, int 2, int 3
41         ret int %tmp1
42 }
43
44 int %f6(uint %a, uint %b) {
45 entry:
46         %tmp = setgt uint %a, %b                ; <bool> [#uses=1]
47         %tmp1 = select bool %tmp, int 2, int 3
48         ret int %tmp1
49 }