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