• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=thumb | \
2; RUN:   grep mvn | count 1
3; RUN: llc < %s -march=thumb | \
4; RUN:   grep adc | count 1
5; RUN: llc < %s -march=thumb | \
6; RUN:   grep sbc | count 1
7; RUN: llc < %s -mtriple=thumb-apple-darwin | grep __muldi3
8
9define i64 @f1() {
10entry:
11        ret i64 0
12}
13
14define i64 @f2() {
15entry:
16        ret i64 1
17}
18
19define i64 @f3() {
20entry:
21        ret i64 2147483647
22}
23
24define i64 @f4() {
25entry:
26        ret i64 2147483648
27}
28
29define i64 @f5() {
30entry:
31        ret i64 9223372036854775807
32}
33
34define i64 @f6(i64 %x, i64 %y) {
35entry:
36        %tmp1 = add i64 %y, 1           ; <i64> [#uses=1]
37        ret i64 %tmp1
38}
39
40define void @f7() {
41entry:
42        %tmp = call i64 @f8( )          ; <i64> [#uses=0]
43        ret void
44}
45
46declare i64 @f8()
47
48define i64 @f9(i64 %a, i64 %b) {
49entry:
50        %tmp = sub i64 %a, %b           ; <i64> [#uses=1]
51        ret i64 %tmp
52}
53
54define i64 @f(i32 %a, i32 %b) {
55entry:
56        %tmp = sext i32 %a to i64               ; <i64> [#uses=1]
57        %tmp1 = sext i32 %b to i64              ; <i64> [#uses=1]
58        %tmp2 = mul i64 %tmp1, %tmp             ; <i64> [#uses=1]
59        ret i64 %tmp2
60}
61
62define i64 @g(i32 %a, i32 %b) {
63entry:
64        %tmp = zext i32 %a to i64               ; <i64> [#uses=1]
65        %tmp1 = zext i32 %b to i64              ; <i64> [#uses=1]
66        %tmp2 = mul i64 %tmp1, %tmp             ; <i64> [#uses=1]
67        ret i64 %tmp2
68}
69
70define i64 @f10() {
71entry:
72        %a = alloca i64, align 8                ; <i64*> [#uses=1]
73        %retval = load i64* %a          ; <i64> [#uses=1]
74        ret i64 %retval
75}
76
77