• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
2
3; 171 = 0x000000ab
4define i32 @f1(i32 %a) {
5; CHECK-LABEL: f1:
6; CHECK: subs r0, #171
7    %tmp = sub i32 %a, 171
8    ret i32 %tmp
9}
10
11; 1179666 = 0x00120012
12define i32 @f2(i32 %a) {
13; CHECK-LABEL: f2:
14; CHECK: sub.w r0, r0, #1179666
15    %tmp = sub i32 %a, 1179666
16    ret i32 %tmp
17}
18
19; 872428544 = 0x34003400
20define i32 @f3(i32 %a) {
21; CHECK-LABEL: f3:
22; CHECK: sub.w r0, r0, #872428544
23    %tmp = sub i32 %a, 872428544
24    ret i32 %tmp
25}
26
27; 1448498774 = 0x56565656
28define i32 @f4(i32 %a) {
29; CHECK-LABEL: f4:
30; CHECK: sub.w r0, r0, #1448498774
31    %tmp = sub i32 %a, 1448498774
32    ret i32 %tmp
33}
34
35; 510 = 0x000001fe
36define i32 @f5(i32 %a) {
37; CHECK-LABEL: f5:
38; CHECK: sub.w r0, r0, #510
39    %tmp = sub i32 %a, 510
40    ret i32 %tmp
41}
42
43; Don't change this to an add.
44define i32 @f6(i32 %a) {
45; CHECK-LABEL: f6:
46; CHECK: subs r0, #1
47    %tmp = sub i32 %a, 1
48    ret i32 %tmp
49}
50