• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-unknown-linux-gnu | FileCheck %s --check-prefixes=X86
3
4define { i64, i8 } @mulodi_test(i64 %l, i64 %r) unnamed_addr #0 {
5; X86-LABEL: mulodi_test:
6; X86:       # %bb.0: # %start
7; X86-NEXT:    pushl %ebp
8; X86-NEXT:    .cfi_def_cfa_offset 8
9; X86-NEXT:    pushl %ebx
10; X86-NEXT:    .cfi_def_cfa_offset 12
11; X86-NEXT:    pushl %edi
12; X86-NEXT:    .cfi_def_cfa_offset 16
13; X86-NEXT:    pushl %esi
14; X86-NEXT:    .cfi_def_cfa_offset 20
15; X86-NEXT:    .cfi_offset %esi, -20
16; X86-NEXT:    .cfi_offset %edi, -16
17; X86-NEXT:    .cfi_offset %ebx, -12
18; X86-NEXT:    .cfi_offset %ebp, -8
19; X86-NEXT:    movl {{[0-9]+}}(%esp), %ebp
20; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
21; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
22; X86-NEXT:    testl %esi, %esi
23; X86-NEXT:    setne %dl
24; X86-NEXT:    testl %eax, %eax
25; X86-NEXT:    setne %bl
26; X86-NEXT:    andb %dl, %bl
27; X86-NEXT:    mull {{[0-9]+}}(%esp)
28; X86-NEXT:    movl %eax, %edi
29; X86-NEXT:    seto %cl
30; X86-NEXT:    movl %esi, %eax
31; X86-NEXT:    mull %ebp
32; X86-NEXT:    movl %eax, %esi
33; X86-NEXT:    seto %ch
34; X86-NEXT:    orb %cl, %ch
35; X86-NEXT:    addl %edi, %esi
36; X86-NEXT:    movl %ebp, %eax
37; X86-NEXT:    mull {{[0-9]+}}(%esp)
38; X86-NEXT:    addl %esi, %edx
39; X86-NEXT:    setb %cl
40; X86-NEXT:    orb %ch, %cl
41; X86-NEXT:    orb %bl, %cl
42; X86-NEXT:    popl %esi
43; X86-NEXT:    .cfi_def_cfa_offset 16
44; X86-NEXT:    popl %edi
45; X86-NEXT:    .cfi_def_cfa_offset 12
46; X86-NEXT:    popl %ebx
47; X86-NEXT:    .cfi_def_cfa_offset 8
48; X86-NEXT:    popl %ebp
49; X86-NEXT:    .cfi_def_cfa_offset 4
50; X86-NEXT:    retl
51start:
52  %0 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %l, i64 %r) #2
53  %1 = extractvalue { i64, i1 } %0, 0
54  %2 = extractvalue { i64, i1 } %0, 1
55  %3 = zext i1 %2 to i8
56  %4 = insertvalue { i64, i8 } undef, i64 %1, 0
57  %5 = insertvalue { i64, i8 } %4, i8 %3, 1
58  ret { i64, i8 } %5
59}
60
61; Function Attrs: nounwind readnone speculatable
62declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1
63
64attributes #0 = { nounwind readnone uwtable }
65attributes #1 = { nounwind readnone speculatable }
66attributes #2 = { nounwind }
67