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, r6, lr}
8 ; THUMBV7-NEXT: push {r4, r5, r6, lr}
9 ; THUMBV7-NEXT: umull r12, lr, r3, r0
10 ; THUMBV7-NEXT: movs r6, #0
11 ; THUMBV7-NEXT: umull r4, r5, r1, r2
12 ; THUMBV7-NEXT: umull r0, r2, r0, r2
13 ; THUMBV7-NEXT: add r4, r12
14 ; THUMBV7-NEXT: adds.w r12, r2, r4
15 ; THUMBV7-NEXT: adc r2, r6, #0
16 ; THUMBV7-NEXT: cmp r3, #0
18 ; THUMBV7-NEXT: movne r3, #1
19 ; THUMBV7-NEXT: cmp r1, #0
21 ; THUMBV7-NEXT: movne r1, #1
22 ; THUMBV7-NEXT: cmp r5, #0
23 ; THUMBV7-NEXT: and.w r1, r1, r3
25 ; THUMBV7-NEXT: movne r5, #1
26 ; THUMBV7-NEXT: orrs r1, r5
27 ; THUMBV7-NEXT: cmp.w lr, #0
29 ; THUMBV7-NEXT: movne.w lr, #1
30 ; THUMBV7-NEXT: orr.w r1, r1, lr
31 ; THUMBV7-NEXT: orrs r2, r1
32 ; THUMBV7-NEXT: mov r1, r12
33 ; THUMBV7-NEXT: pop {r4, r5, r6, pc}
35 %0 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %l, i64 %r) #2
36 %1 = extractvalue { i64, i1 } %0, 0
37 %2 = extractvalue { i64, i1 } %0, 1
39 %4 = insertvalue { i64, i8 } undef, i64 %1, 0
40 %5 = insertvalue { i64, i8 } %4, i8 %3, 1
44 ; Function Attrs: nounwind readnone speculatable
45 declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1
47 attributes #0 = { nounwind readnone uwtable }
48 attributes #1 = { nounwind readnone speculatable }
49 attributes #2 = { nounwind }