summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopUnroll/AArch64
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2019-04-17 02:12:23 +0000
committerEric Christopher <echristo@gmail.com>2019-04-17 02:12:23 +0000
commita86343512845c9c1fdbac865fea88aa5fce7142a (patch)
tree666fc6353de19ad8b00e56b67edd33f24104e4a7 /llvm/test/Transforms/LoopUnroll/AArch64
parent7f8ca6e3679b3af951cb7a4b1377edfaa3244b93 (diff)
downloadbcm5719-llvm-a86343512845c9c1fdbac865fea88aa5fce7142a.tar.gz
bcm5719-llvm-a86343512845c9c1fdbac865fea88aa5fce7142a.zip
Temporarily Revert "Add basic loop fusion pass."
As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
Diffstat (limited to 'llvm/test/Transforms/LoopUnroll/AArch64')
-rw-r--r--llvm/test/Transforms/LoopUnroll/AArch64/falkor-prefetch.ll169
-rw-r--r--llvm/test/Transforms/LoopUnroll/AArch64/full-unroll-trip-count-upper-bound.ll43
-rw-r--r--llvm/test/Transforms/LoopUnroll/AArch64/lit.local.cfg3
-rw-r--r--llvm/test/Transforms/LoopUnroll/AArch64/partial.ll76
-rw-r--r--llvm/test/Transforms/LoopUnroll/AArch64/runtime-loop.ll39
5 files changed, 0 insertions, 330 deletions
diff --git a/llvm/test/Transforms/LoopUnroll/AArch64/falkor-prefetch.ll b/llvm/test/Transforms/LoopUnroll/AArch64/falkor-prefetch.ll
deleted file mode 100644
index b2930dc5f89..00000000000
--- a/llvm/test/Transforms/LoopUnroll/AArch64/falkor-prefetch.ll
+++ /dev/null
@@ -1,169 +0,0 @@
-; RUN: opt < %s -S -loop-unroll -mtriple aarch64 -mcpu=falkor | FileCheck %s
-; RUN: opt < %s -S -loop-unroll -mtriple aarch64 -mcpu=falkor -enable-falkor-hwpf-unroll-fix=0 | FileCheck %s --check-prefix=NOHWPF
-
-; Check that loop unroller doesn't exhaust HW prefetcher resources.
-
-; Partial unroll 2 times for this loop on falkor instead of 4.
-; NOHWPF-LABEL: @unroll1(
-; NOHWPF-LABEL: loop:
-; NOHWPF-NEXT: phi
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: icmp
-; NOHWPF-NEXT: br
-; NOHWPF-NEXT-LABEL: exit:
-;
-; CHECK-LABEL: @unroll1(
-; CHECK-LABEL: loop:
-; CHECK-NEXT: phi
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: add
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: add
-; CHECK-NEXT: icmp
-; CHECK-NEXT: br
-; CHECK-NEXT-LABEL: exit:
-define void @unroll1(i32* %p, i32* %p2) {
-entry:
- br label %loop
-
-loop:
- %iv = phi i32 [ 0, %entry ], [ %inc, %loop ]
-
- %gep = getelementptr inbounds i32, i32* %p, i32 %iv
- %load = load volatile i32, i32* %gep
-
- %gep2 = getelementptr inbounds i32, i32* %p2, i32 %iv
- %load2 = load volatile i32, i32* %gep2
-
- %inc = add i32 %iv, 1
- %exitcnd = icmp uge i32 %inc, 1024
- br i1 %exitcnd, label %exit, label %loop
-
-exit:
- ret void
-}
-
-; Partial unroll 4 times for this loop on falkor instead of 8.
-; NOHWPF-LABEL: @unroll2(
-; NOHWPF-LABEL: loop2:
-; NOHWPF-NEXT: phi
-; NOHWPF-NEXT: phi
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: getelementptr
-; NOHWPF-NEXT: load
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: add
-; NOHWPF-NEXT: icmp
-; NOHWPF-NEXT: br
-; NOHWPF-NEXT-LABEL: exit2:
-;
-; CHECK-LABEL: @unroll2(
-; CHECK-LABEL: loop2:
-; CHECK-NEXT: phi
-; CHECK-NEXT: phi
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: getelementptr
-; CHECK-NEXT: load
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: icmp
-; CHECK-NEXT: br
-; CHECK-NEXT-LABEL: exit2:
-
-define void @unroll2(i32* %p) {
-entry:
- br label %loop1
-
-loop1:
- %iv1 = phi i32 [ 0, %entry ], [ %inc1, %loop1.latch ]
- %outer.sum = phi i32 [ 0, %entry ], [ %sum, %loop1.latch ]
- br label %loop2.header
-
-loop2.header:
- br label %loop2
-
-loop2:
- %iv2 = phi i32 [ 0, %loop2.header ], [ %inc2, %loop2 ]
- %sum = phi i32 [ %outer.sum, %loop2.header ], [ %sum.inc, %loop2 ]
- %gep = getelementptr inbounds i32, i32* %p, i32 %iv2
- %load = load i32, i32* %gep
- %sum.inc = add i32 %sum, %load
- %inc2 = add i32 %iv2, 1
- %exitcnd2 = icmp uge i32 %inc2, 1024
- br i1 %exitcnd2, label %exit2, label %loop2
-
-exit2:
- br label %loop1.latch
-
-loop1.latch:
- %inc1 = add i32 %iv1, 1
- %exitcnd1 = icmp uge i32 %inc1, 1024
- br i1 %exitcnd2, label %exit, label %loop1
-
-exit:
- ret void
-}
-
diff --git a/llvm/test/Transforms/LoopUnroll/AArch64/full-unroll-trip-count-upper-bound.ll b/llvm/test/Transforms/LoopUnroll/AArch64/full-unroll-trip-count-upper-bound.ll
deleted file mode 100644
index 5c70a2668db..00000000000
--- a/llvm/test/Transforms/LoopUnroll/AArch64/full-unroll-trip-count-upper-bound.ll
+++ /dev/null
@@ -1,43 +0,0 @@
-; RUN: opt -loop-unroll -S -mtriple aarch64 -mcpu=cortex-a57 %s | FileCheck %s -check-prefix=UNROLL
-; RUN: opt -loop-unroll -unroll-max-upperbound=0 -S -mtriple aarch64 -mcpu=cortex-a57 %s | FileCheck %s -check-prefix=NOUNROLL
-
-; This IR comes from this C code:
-;
-; for (int i = 0; i < 4; i++) {
-; if (src[i] == 1) {
-; *dst = i;
-; break;
-; }
-; }
-;
-; This test is meant to check that this loop is unrolled into four iterations.
-
-; UNROLL-LABEL: @test
-; UNROLL: load i32, i32*
-; UNROLL: load i32, i32*
-; UNROLL: load i32, i32*
-; UNROLL: load i32, i32*
-; UNROLL-NOT: load i32, i32*
-; NOUNROLL-LABEL: @test
-; NOUNROLL: load i32, i32*
-; NOUNROLL-NOT: load i32, i32*
-
-define void @test(i32* %dst, i32* %src) {
-entry:
- br label %for.body
-
-for.body: ; preds = %entry, %for.body
- %i = phi i32 [ 0, %entry ], [ %inc, %for.body ]
- %0 = sext i32 %i to i64
- %1 = getelementptr inbounds i32, i32* %src, i64 %0
- %2 = load i32, i32* %1
- %inc = add nsw i32 %i, 1
- %cmp1 = icmp slt i32 %inc, 4
- %cmp3 = icmp eq i32 %2, 1
- %or.cond = and i1 %cmp3, %cmp1
- br i1 %or.cond, label %for.body, label %exit
-
-exit: ; preds = %for.body
- store i32 %i, i32* %dst
- ret void
-}
diff --git a/llvm/test/Transforms/LoopUnroll/AArch64/lit.local.cfg b/llvm/test/Transforms/LoopUnroll/AArch64/lit.local.cfg
deleted file mode 100644
index cec29af5bbe..00000000000
--- a/llvm/test/Transforms/LoopUnroll/AArch64/lit.local.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-if not 'AArch64' in config.root.targets:
- config.unsupported = True
-
diff --git a/llvm/test/Transforms/LoopUnroll/AArch64/partial.ll b/llvm/test/Transforms/LoopUnroll/AArch64/partial.ll
deleted file mode 100644
index 8a1ea80c9d5..00000000000
--- a/llvm/test/Transforms/LoopUnroll/AArch64/partial.ll
+++ /dev/null
@@ -1,76 +0,0 @@
-; RUN: opt < %s -S -loop-unroll -mtriple aarch64 -mcpu=cortex-a57 | FileCheck %s
-
-; Partial unroll 8 times for this loop.
-define void @unroll1() nounwind {
-entry:
- br label %loop
-
-loop:
- %iv = phi i32 [ 0, %entry ], [ %inc, %loop ]
- %inc = add i32 %iv, 1
- %exitcnd = icmp uge i32 %inc, 1024
- br i1 %exitcnd, label %exit, label %loop
-
-exit:
- ret void
-}
-
-; CHECK: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: icmp
-
-; Partial unroll 16 times for this loop.
-define void @unroll2() nounwind {
-entry:
- br label %loop1
-
-loop1:
- %iv1 = phi i32 [ 0, %entry ], [ %inc1, %loop1.latch ]
- br label %loop2.header
-
-loop2.header:
- br label %loop2
-
-loop2:
- %iv2 = phi i32 [ 0, %loop2.header ], [ %inc2, %loop2 ]
- %inc2 = add i32 %iv2, 1
- %exitcnd2 = icmp uge i32 %inc2, 1024
- br i1 %exitcnd2, label %exit2, label %loop2
-
-exit2:
- br label %loop1.latch
-
-loop1.latch:
- %inc1 = add i32 %iv1, 1
- %exitcnd1 = icmp uge i32 %inc1, 1024
- br i1 %exitcnd2, label %exit, label %loop1
-
-exit:
- ret void
-}
-
-
-
-; CHECK: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: icmp
diff --git a/llvm/test/Transforms/LoopUnroll/AArch64/runtime-loop.ll b/llvm/test/Transforms/LoopUnroll/AArch64/runtime-loop.ll
deleted file mode 100644
index b800b4ac545..00000000000
--- a/llvm/test/Transforms/LoopUnroll/AArch64/runtime-loop.ll
+++ /dev/null
@@ -1,39 +0,0 @@
-; RUN: opt < %s -S -loop-unroll -mtriple aarch64 -mcpu=cortex-a57 -unroll-runtime-epilog=true | FileCheck %s -check-prefix=EPILOG
-; RUN: opt < %s -S -loop-unroll -mtriple aarch64 -mcpu=cortex-a57 -unroll-runtime-epilog=false | FileCheck %s -check-prefix=PROLOG
-
-; Tests for unrolling loops with run-time trip counts
-
-; EPILOG: %xtraiter = and i32 %n
-; EPILOG: for.body:
-; EPILOG: %lcmp.mod = icmp ne i32 %xtraiter, 0
-; EPILOG: br i1 %lcmp.mod, label %for.body.epil.preheader, label %for.end.loopexit
-; EPILOG: for.body.epil:
-
-; PROLOG: %xtraiter = and i32 %n
-; PROLOG: %lcmp.mod = icmp ne i32 %xtraiter, 0
-; PROLOG: br i1 %lcmp.mod, label %for.body.prol.preheader, label %for.body.prol.loopexit
-; PROLOG: for.body.prol:
-; PROLOG: for.body:
-
-define i32 @test(i32* nocapture %a, i32 %n) nounwind uwtable readonly {
-entry:
- %cmp1 = icmp eq i32 %n, 0
- br i1 %cmp1, label %for.end, label %for.body
-
-for.body: ; preds = %for.body, %entry
- %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
- %sum.02 = phi i32 [ %add, %for.body ], [ 0, %entry ]
- %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
- %0 = load i32, i32* %arrayidx, align 4
- %add = add nsw i32 %0, %sum.02
- %indvars.iv.next = add i64 %indvars.iv, 1
- %lftr.wideiv = trunc i64 %indvars.iv.next to i32
- %exitcond = icmp eq i32 %lftr.wideiv, %n
- br i1 %exitcond, label %for.end, label %for.body
-
-for.end: ; preds = %for.body, %entry
- %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ]
- ret i32 %sum.0.lcssa
-}
-
-
OpenPOWER on IntegriCloud