1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu | FileCheck %s --check-prefixes=AARCH
4 define { i128, i8 } @muloti_test(i128 %l, i128 %r) unnamed_addr #0 {
5 ; AARCH-LABEL: muloti_test:
6 ; AARCH: // %bb.0: // %start
7 ; AARCH-NEXT: cmp x3, #0
8 ; AARCH-NEXT: umulh x8, x1, x2
9 ; AARCH-NEXT: cset w10, ne
10 ; AARCH-NEXT: cmp x1, #0
11 ; AARCH-NEXT: mul x9, x3, x0
12 ; AARCH-NEXT: cset w11, ne
13 ; AARCH-NEXT: cmp xzr, x8
14 ; AARCH-NEXT: umulh x8, x3, x0
15 ; AARCH-NEXT: madd x9, x1, x2, x9
16 ; AARCH-NEXT: and w10, w11, w10
17 ; AARCH-NEXT: cset w11, ne
18 ; AARCH-NEXT: cmp xzr, x8
19 ; AARCH-NEXT: umulh x8, x0, x2
20 ; AARCH-NEXT: orr w10, w10, w11
21 ; AARCH-NEXT: cset w11, ne
22 ; AARCH-NEXT: adds x1, x8, x9
23 ; AARCH-NEXT: orr w8, w10, w11
24 ; AARCH-NEXT: cset w9, hs
25 ; AARCH-NEXT: orr w8, w8, w9
26 ; AARCH-NEXT: mul x0, x0, x2
27 ; AARCH-NEXT: mov w2, w8
30 %0 = tail call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %l, i128 %r) #2
31 %1 = extractvalue { i128, i1 } %0, 0
32 %2 = extractvalue { i128, i1 } %0, 1
34 %4 = insertvalue { i128, i8 } undef, i128 %1, 0
35 %5 = insertvalue { i128, i8 } %4, i8 %3, 1
39 ; Function Attrs: nounwind readnone speculatable
40 declare { i128, i1 } @llvm.umul.with.overflow.i128(i128, i128) #1
42 attributes #0 = { nounwind readnone uwtable }
43 attributes #1 = { nounwind readnone speculatable }
44 attributes #2 = { nounwind }