summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/ctrloop-udivti3.ll
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-04-09 00:20:52 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-04-09 00:20:52 +0000
commitc69aaa1a2ca8dd581aec9aa326ddfd57d4827294 (patch)
tree5546bb399feffc66d329522b723c015e74f141c1 /test/CodeGen/PowerPC/ctrloop-udivti3.ll
parent4b87fb1a4beb773630b0e47a1f2885d935afef29 (diff)
downloadllvm-c69aaa1a2ca8dd581aec9aa326ddfd57d4827294.tar.gz
llvm-c69aaa1a2ca8dd581aec9aa326ddfd57d4827294.tar.bz2
llvm-c69aaa1a2ca8dd581aec9aa326ddfd57d4827294.tar.xz
Merging r202192:
------------------------------------------------------------------------ r202192 | hfinkel | 2014-02-25 15:51:50 -0500 (Tue, 25 Feb 2014) | 5 lines 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/branches/release_34@205822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/ctrloop-udivti3.ll')
-rw-r--r--test/CodeGen/PowerPC/ctrloop-udivti3.ll31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/ctrloop-udivti3.ll b/test/CodeGen/PowerPC/ctrloop-udivti3.ll
new file mode 100644
index 0000000000..d07a11fe60
--- /dev/null
+++ b/test/CodeGen/PowerPC/ctrloop-udivti3.ll
@@ -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 }
+