• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=ppc64 | FileCheck %s
2target datalayout = "E-m:e-i64:64-n32:64"
3target triple = "powerpc64-unknown-linux-gnu"
4
5; Function Attrs: nounwind
6define hidden void @_mpd_shortdiv(i64 %n) #0 {
7entry:
8  br i1 undef, label %for.end, label %for.body.lr.ph
9
10for.body.lr.ph:                                   ; preds = %entry
11  br label %for.body
12
13for.body:                                         ; preds = %for.body, %for.body.lr.ph
14  %i.018.in = phi i64 [ %n, %for.body.lr.ph ], [ %i.018, %for.body ]
15  %i.018 = add i64 %i.018.in, -1
16  %jj = sext i64 %i.018 to i128
17  %add.i = or i128 %jj, undef
18  %div.i = udiv i128 %add.i, %jj
19  %conv3.i11 = trunc i128 %div.i to i64
20  store i64 %conv3.i11, i64* undef, align 8
21  %cmp = icmp eq i64 %i.018, 0
22  br i1 %cmp, label %for.end, label %for.body
23
24for.end:                                          ; preds = %for.body, %entry
25  ret void
26}
27
28; CHECK-LABEL: @_mpd_shortdiv
29; CHECK-NOT: mtctr
30
31attributes #0 = { nounwind }
32
33