1 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s
3 define i32 @t2ADDrc_255(i32 %lhs) {
4 ; CHECK-LABEL: t2ADDrc_255:
6 ; CHECK: add{{.*}} #255
9 %Rd = add i32 %lhs, 255
13 define i32 @t2ADDrc_256(i32 %lhs) {
14 ; CHECK-LABEL: t2ADDrc_256:
16 ; CHECK: add{{.*}} #256
19 %Rd = add i32 %lhs, 256
23 define i32 @t2ADDrc_257(i32 %lhs) {
24 ; CHECK-LABEL: t2ADDrc_257:
26 ; CHECK: add{{.*}} #257
29 %Rd = add i32 %lhs, 257
33 define i32 @t2ADDrc_4094(i32 %lhs) {
34 ; CHECK-LABEL: t2ADDrc_4094:
36 ; CHECK: add{{.*}} #4094
39 %Rd = add i32 %lhs, 4094
43 define i32 @t2ADDrc_4095(i32 %lhs) {
44 ; CHECK-LABEL: t2ADDrc_4095:
46 ; CHECK: add{{.*}} #4095
49 %Rd = add i32 %lhs, 4095
53 define i32 @t2ADDrc_4096(i32 %lhs) {
54 ; CHECK-LABEL: t2ADDrc_4096:
56 ; CHECK: add{{.*}} #4096
59 %Rd = add i32 %lhs, 4096
63 define i32 @t2ADDrr(i32 %lhs, i32 %rhs) {
64 ; CHECK-LABEL: t2ADDrr:
69 %Rd = add i32 %lhs, %rhs
73 define i32 @t2ADDrs(i32 %lhs, i32 %rhs) {
74 ; CHECK-LABEL: t2ADDrs:
76 ; CHECK: add{{.*}} lsl #8
79 %tmp = shl i32 %rhs, 8
80 %Rd = add i32 %lhs, %tmp