1 ; RUN: llc < %s -mtriple=thumb-eabi | FileCheck %s --check-prefixes CHECK,CHECK-LITTLE
2 ; RUN: llc < %s -mtriple=thumbeb-eabi | FileCheck %s --check-prefixes CHECK,CHECK-BIG
4 define i1 @umulo32(i32 %l, i32 %r) unnamed_addr #0 {
5 ; CHECK-LABEL: umulo32:
6 ; CHECK: @ %bb.0: @ %start
7 ; CHECK-NEXT: .save {r7, lr}
8 ; CHECK-NEXT: push {r7, lr}
9 ; CHECK-LITTLE-NEXT: movs r2, r1
10 ; CHECK-LITTLE-NEXT: movs r1, #0
11 ; CHECK-NEXT: movs r3, r1
12 ; CHECK-BIG-NEXT: movs r1, r0
13 ; CHECK-BIG-NEXT: movs r0, #0
14 ; CHECK-BIG-NEXT: movs r2, r0
15 ; CHECK-NEXT: bl __aeabi_lmul
16 ; CHECK-LITTLE-NEXT: movs r0, r1
17 ; CHECK-LITTLE-NEXT: subs r1, r1, #1
18 ; CHECK-BIG-NEXT: subs r1, r0, #1
19 ; CHECK-NEXT: sbcs r0, r1
20 ; CHECK-NEXT: pop {r7}
21 ; CHECK-NEXT: pop {r1}
24 %0 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %l, i32 %r) #2
25 %1 = extractvalue { i32, i1 } %0, 1
29 ; Function Attrs: nounwind readnone speculatable
30 declare { i32, i1 } @llvm.umul.with.overflow.i32(i32, i32) #1
32 attributes #0 = { nounwind readnone uwtable }
33 attributes #1 = { nounwind readnone speculatable }
34 attributes #2 = { nounwind }