blob: d42ea7138e465bca24ebd429dd4c194146137904 [file] [log] [blame]
Dan Gohmanfce288f2009-09-09 00:09:15 +00001; 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
Anton Korobeynikov52237112009-06-17 18:13:58 +00009
10define i32 @t2ADDrc_255(i32 %lhs) {
11 %Rd = add i32 %lhs, 255;
12 ret i32 %Rd
13}
14
15define i32 @t2ADDrc_256(i32 %lhs) {
16 %Rd = add i32 %lhs, 256;
17 ret i32 %Rd
18}
19
20define i32 @t2ADDrc_257(i32 %lhs) {
21 %Rd = add i32 %lhs, 257;
22 ret i32 %Rd
23}
24
25define i32 @t2ADDrc_4094(i32 %lhs) {
26 %Rd = add i32 %lhs, 4094;
27 ret i32 %Rd
28}
29
30define i32 @t2ADDrc_4095(i32 %lhs) {
31 %Rd = add i32 %lhs, 4095;
32 ret i32 %Rd
33}
34
35define i32 @t2ADDrc_4096(i32 %lhs) {
36 %Rd = add i32 %lhs, 4096;
37 ret i32 %Rd
38}
39
40define i32 @t2ADDrr(i32 %lhs, i32 %rhs) {
41 %Rd = add i32 %lhs, %rhs;
42 ret i32 %Rd
43}
44
45define i32 @t2ADDrs(i32 %lhs, i32 %rhs) {
46 %tmp = shl i32 %rhs, 8
47 %Rd = add i32 %lhs, %tmp;
48 ret i32 %Rd
49}
50