forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for 128-bit integer operations in PPCCTRLoops
We need to abort the formation of counter-register-based loops where there are 128-bit integer operations that might become function calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202192 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Hal Finkel
committed
Feb 25, 2014
1 parent
724e528
commit 15ac7df
Showing
2 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
; RUN: llc < %s -march=ppc64 | FileCheck %s | ||
target datalayout = "E-m:e-i64:64-n32:64" | ||
target triple = "powerpc64-unknown-linux-gnu" | ||
|
||
; Function Attrs: nounwind | ||
define hidden void @_mpd_shortdiv(i64 %n) #0 { | ||
entry: | ||
br i1 undef, label %for.end, label %for.body.lr.ph | ||
|
||
for.body.lr.ph: ; preds = %entry | ||
br label %for.body | ||
|
||
for.body: ; preds = %for.body, %for.body.lr.ph | ||
%i.018.in = phi i64 [ %n, %for.body.lr.ph ], [ %i.018, %for.body ] | ||
%i.018 = add i64 %i.018.in, -1 | ||
%add.i = or i128 undef, undef | ||
%div.i = udiv i128 %add.i, 0 | ||
%conv3.i11 = trunc i128 %div.i to i64 | ||
store i64 %conv3.i11, i64* undef, align 8 | ||
%cmp = icmp eq i64 %i.018, 0 | ||
br i1 %cmp, label %for.end, label %for.body | ||
|
||
for.end: ; preds = %for.body, %entry | ||
ret void | ||
} | ||
|
||
; CHECK-LABEL: @_mpd_shortdiv | ||
; CHECK-NOT: mtctr | ||
|
||
attributes #0 = { nounwind } | ||
|