1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=thumbv7-unknown-none-gnueabi | FileCheck %s --check-prefixes=THUMBV7
4 define { i64, i8 } @mulodi_test(i64 %l, i64 %r) unnamed_addr #0 {
5 ; THUMBV7-LABEL: mulodi_test:
6 ; THUMBV7: @ %bb.0: @ %start
7 ; THUMBV7-NEXT: .save {r4, r5, r7, lr}
8 ; THUMBV7-NEXT: push {r4, r5, r7, lr}
9 ; THUMBV7-NEXT: umull r12, lr, r3, r0
10 ; THUMBV7-NEXT: cmp r3, #0
12 ; THUMBV7-NEXT: movne r3, #1
13 ; THUMBV7-NEXT: cmp r1, #0
14 ; THUMBV7-NEXT: umull r0, r4, r0, r2
15 ; THUMBV7-NEXT: umull r2, r5, r1, r2
17 ; THUMBV7-NEXT: movne r1, #1
18 ; THUMBV7-NEXT: ands r1, r3
19 ; THUMBV7-NEXT: cmp r5, #0
21 ; THUMBV7-NEXT: movne r5, #1
22 ; THUMBV7-NEXT: orrs r1, r5
23 ; THUMBV7-NEXT: cmp.w lr, #0
25 ; THUMBV7-NEXT: movne.w lr, #1
26 ; THUMBV7-NEXT: orr.w r3, r1, lr
27 ; THUMBV7-NEXT: add.w r1, r2, r12
28 ; THUMBV7-NEXT: movs r2, #0
29 ; THUMBV7-NEXT: adds r1, r1, r4
30 ; THUMBV7-NEXT: adc r2, r2, #0
31 ; THUMBV7-NEXT: orrs r2, r3
32 ; THUMBV7-NEXT: pop {r4, r5, r7, pc}
34 %0 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %l, i64 %r) #2
35 %1 = extractvalue { i64, i1 } %0, 0
36 %2 = extractvalue { i64, i1 } %0, 1
38 %4 = insertvalue { i64, i8 } undef, i64 %1, 0
39 %5 = insertvalue { i64, i8 } %4, i8 %3, 1
43 ; Function Attrs: nounwind readnone speculatable
44 declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1
46 attributes #0 = { nounwind readnone uwtable }
47 attributes #1 = { nounwind readnone speculatable }
48 attributes #2 = { nounwind }