blob: 34620bcc5dc4a4c1a4b5a8ec36df6835fe41137b [file] [log] [blame]
Evan Cheng427fd7a2009-08-12 01:49:45 +00001; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | FileCheck %s
David Goodwine5671072009-06-26 18:10:30 +00002
3; 171 = 0x000000ab
4define i64 @f1(i64 %a) {
Evan Cheng427fd7a2009-08-12 01:49:45 +00005; CHECK: f1:
6; CHECK: adds r0, #171
7; CHECK: adc r1, r1, #0
David Goodwine5671072009-06-26 18:10:30 +00008 %tmp = add i64 %a, 171
9 ret i64 %tmp
10}
11
12; 1179666 = 0x00120012
13define i64 @f2(i64 %a) {
Evan Cheng427fd7a2009-08-12 01:49:45 +000014; CHECK: f2:
15; CHECK: adds.w r0, r0, #1179666
16; CHECK: adc r1, r1, #0
David Goodwine5671072009-06-26 18:10:30 +000017 %tmp = add i64 %a, 1179666
18 ret i64 %tmp
19}
20
21; 872428544 = 0x34003400
22define i64 @f3(i64 %a) {
Evan Cheng427fd7a2009-08-12 01:49:45 +000023; CHECK: f3:
24; CHECK: adds.w r0, r0, #872428544
25; CHECK: adc r1, r1, #0
David Goodwine5671072009-06-26 18:10:30 +000026 %tmp = add i64 %a, 872428544
27 ret i64 %tmp
28}
29
30; 1448498774 = 0x56565656
31define i64 @f4(i64 %a) {
Evan Cheng427fd7a2009-08-12 01:49:45 +000032; CHECK: f4:
33; CHECK: adds.w r0, r0, #1448498774
34; CHECK: adc r1, r1, #0
David Goodwine5671072009-06-26 18:10:30 +000035 %tmp = add i64 %a, 1448498774
36 ret i64 %tmp
37}
38
39; 66846720 = 0x03fc0000
40define i64 @f5(i64 %a) {
Evan Cheng427fd7a2009-08-12 01:49:45 +000041; CHECK: f5:
42; CHECK: adds.w r0, r0, #66846720
43; CHECK: adc r1, r1, #0
David Goodwine5671072009-06-26 18:10:30 +000044 %tmp = add i64 %a, 66846720
45 ret i64 %tmp
46}