Convert tests using "| wc -l | grep ..." to use the count script.
[oota-llvm.git] / test / CodeGen / ARM / long.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
2 ; RUN:   grep -- {-2147483648} | count 3
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mvn | count 3
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adds | count 1
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adc | count 1
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep {subs } | count 1
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep sbc | count 1
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
9 ; RUN:   grep smull | count 1
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
11 ; RUN:   grep umull | count 1
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | \
13 ; RUN:   grep mvn | count 1
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | \
15 ; RUN:   grep adc | count 1
16 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | \
17 ; RUN:   grep sbc | count 1
18 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | grep __muldi3
19 ; END.
20
21 long %f1() {
22 entry:
23         ret long 0
24 }
25
26 long %f2() {
27 entry:
28         ret long 1
29 }
30
31 long %f3() {
32 entry:
33         ret long 2147483647
34 }
35
36 long %f4() {
37 entry:
38         ret long 2147483648
39 }
40
41 long %f5() {
42 entry:
43         ret long 9223372036854775807
44 }
45
46 ulong %f6(ulong %x, ulong %y) {
47 entry:
48         %tmp1 = add ulong %y, 1
49         ret ulong %tmp1
50 }
51
52 void %f7() {
53 entry:
54         %tmp = call long %f8()
55         ret void
56 }
57 declare long %f8()
58
59 long %f9(long %a, long %b) {
60 entry:
61         %tmp = sub long %a, %b
62         ret long %tmp
63 }
64
65 long %f(int %a, int %b) {
66 entry:
67         %tmp = cast int %a to long
68         %tmp1 = cast int %b to long
69         %tmp2 = mul long %tmp1, %tmp
70         ret long %tmp2
71 }
72
73 ulong %g(uint %a, uint %b) {
74 entry:
75         %tmp = cast uint %a to ulong
76         %tmp1 = cast uint %b to ulong
77         %tmp2 = mul ulong %tmp1, %tmp
78         ret ulong %tmp2
79 }
80
81 ulong %f10() {
82 entry:
83         %a = alloca ulong, align 8
84         %retval = load ulong* %a
85         ret ulong %retval
86 }