1 ; RUN: llc < %s -march=arm | FileCheck %s
3 define i64 @f0(i64 %A, i64 %B) {
5 ; CHECK: lsrs r3, r3, #1
6 ; CHECK-NEXT: rrx r2, r2
7 ; CHECK-NEXT: subs r0, r0, r2
8 ; CHECK-NEXT: sbc r1, r1, r3
9 %tmp = bitcast i64 %A to i64
10 %tmp2 = lshr i64 %B, 1
11 %tmp3 = sub i64 %tmp, %tmp2
15 define i32 @f1(i64 %x, i64 %y) {
19 %b = trunc i64 %a to i32
23 define i32 @f2(i64 %x, i64 %y) {
26 ; CHECK-NEXT: rsb r3, r2, #32
27 ; CHECK-NEXT: subs r2, r2, #32
28 ; CHECK-NEXT: orr r0, r0, r1, lsl r3
29 ; CHECK-NEXT: movge r0, r1, asr r2
31 %b = trunc i64 %a to i32
35 define i32 @f3(i64 %x, i64 %y) {
38 ; CHECK-NEXT: rsb r3, r2, #32
39 ; CHECK-NEXT: subs r2, r2, #32
40 ; CHECK-NEXT: orr r0, r0, r1, lsl r3
41 ; CHECK-NEXT: movge r0, r1, lsr r2
43 %b = trunc i64 %a to i32