• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
2
3define i64 @f1(i64 %a, i64 %b) {
4entry:
5; CHECK: f1:
6; CHECK: subs r0, r0, r2
7; CHECK: sbcs r1, r3
8	%tmp = sub i64 %a, %b
9	ret i64 %tmp
10}
11
12define i64 @f2(i64 %a, i64 %b) {
13entry:
14; CHECK: f2:
15; CHECK: adds r0, r0, r0
16; CHECK: adcs r1, r1
17; CHECK: subs r0, r0, r2
18; CHECK: sbcs r1, r3
19        %tmp1 = shl i64 %a, 1
20	%tmp2 = sub i64 %tmp1, %b
21	ret i64 %tmp2
22}
23