Dan Gohman | fce288f | 2009-09-09 00:09:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s |
David Goodwin | 2634e98 | 2009-06-26 18:10:30 +0000 | [diff] [blame] | 2 | |
| 3 | ; 171 = 0x000000ab |
| 4 | define i64 @f1(i64 %a) { |
Evan Cheng | 05c269c | 2009-08-12 01:49:45 +0000 | [diff] [blame] | 5 | ; CHECK: f1: |
| 6 | ; CHECK: adds r0, #171 |
| 7 | ; CHECK: adc r1, r1, #0 |
David Goodwin | 2634e98 | 2009-06-26 18:10:30 +0000 | [diff] [blame] | 8 | %tmp = add i64 %a, 171 |
| 9 | ret i64 %tmp |
| 10 | } |
| 11 | |
| 12 | ; 1179666 = 0x00120012 |
| 13 | define i64 @f2(i64 %a) { |
Evan Cheng | 05c269c | 2009-08-12 01:49:45 +0000 | [diff] [blame] | 14 | ; CHECK: f2: |
| 15 | ; CHECK: adds.w r0, r0, #1179666 |
| 16 | ; CHECK: adc r1, r1, #0 |
David Goodwin | 2634e98 | 2009-06-26 18:10:30 +0000 | [diff] [blame] | 17 | %tmp = add i64 %a, 1179666 |
| 18 | ret i64 %tmp |
| 19 | } |
| 20 | |
| 21 | ; 872428544 = 0x34003400 |
| 22 | define i64 @f3(i64 %a) { |
Evan Cheng | 05c269c | 2009-08-12 01:49:45 +0000 | [diff] [blame] | 23 | ; CHECK: f3: |
| 24 | ; CHECK: adds.w r0, r0, #872428544 |
| 25 | ; CHECK: adc r1, r1, #0 |
David Goodwin | 2634e98 | 2009-06-26 18:10:30 +0000 | [diff] [blame] | 26 | %tmp = add i64 %a, 872428544 |
| 27 | ret i64 %tmp |
| 28 | } |
| 29 | |
| 30 | ; 1448498774 = 0x56565656 |
| 31 | define i64 @f4(i64 %a) { |
Evan Cheng | 05c269c | 2009-08-12 01:49:45 +0000 | [diff] [blame] | 32 | ; CHECK: f4: |
| 33 | ; CHECK: adds.w r0, r0, #1448498774 |
| 34 | ; CHECK: adc r1, r1, #0 |
David Goodwin | 2634e98 | 2009-06-26 18:10:30 +0000 | [diff] [blame] | 35 | %tmp = add i64 %a, 1448498774 |
| 36 | ret i64 %tmp |
| 37 | } |
| 38 | |
| 39 | ; 66846720 = 0x03fc0000 |
| 40 | define i64 @f5(i64 %a) { |
Evan Cheng | 05c269c | 2009-08-12 01:49:45 +0000 | [diff] [blame] | 41 | ; CHECK: f5: |
| 42 | ; CHECK: adds.w r0, r0, #66846720 |
| 43 | ; CHECK: adc r1, r1, #0 |
David Goodwin | 2634e98 | 2009-06-26 18:10:30 +0000 | [diff] [blame] | 44 | %tmp = add i64 %a, 66846720 |
| 45 | ret i64 %tmp |
| 46 | } |