1 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add | grep #255
2 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add | grep #256
3 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add | grep #257
4 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add | grep #4094
5 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add | grep #4095
6 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add | grep #4096
7 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add
8 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep add | grep lsl | grep #8
10 define i32 @t2ADDrc_255(i32 %lhs) {
11 %Rd = add i32 %lhs, 255;
15 define i32 @t2ADDrc_256(i32 %lhs) {
16 %Rd = add i32 %lhs, 256;
20 define i32 @t2ADDrc_257(i32 %lhs) {
21 %Rd = add i32 %lhs, 257;
25 define i32 @t2ADDrc_4094(i32 %lhs) {
26 %Rd = add i32 %lhs, 4094;
30 define i32 @t2ADDrc_4095(i32 %lhs) {
31 %Rd = add i32 %lhs, 4095;
35 define i32 @t2ADDrc_4096(i32 %lhs) {
36 %Rd = add i32 %lhs, 4096;
40 define i32 @t2ADDrr(i32 %lhs, i32 %rhs) {
41 %Rd = add i32 %lhs, %rhs;
45 define i32 @t2ADDrs(i32 %lhs, i32 %rhs) {
46 %tmp = shl i32 %rhs, 8
47 %Rd = add i32 %lhs, %tmp;