summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll
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/full-unroll-heuristics-dce.ll
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/full-unroll-heuristics-dce.ll')
-rw-r--r--llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll39
1 files changed, 0 insertions, 39 deletions
diff --git a/llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll b/llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll
deleted file mode 100644
index 57de3041f57..00000000000
--- a/llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll
+++ /dev/null
@@ -1,39 +0,0 @@
-; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=12 -unroll-max-percent-threshold-boost=400 | FileCheck %s
-; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=12 -unroll-max-percent-threshold-boost=400 | FileCheck %s
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-
-@known_constant = internal unnamed_addr constant [10 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0], align 16
-
-; If a load becomes a constant after loop unrolling, we sometimes can simplify
-; CFG. This test verifies that we handle such cases.
-; After one operand in an instruction is constant-folded and the
-; instruction is simplified, the other operand might become dead.
-; In this test we have::
-; for i in 1..10:
-; r += A[i] * B[i]
-; A[i] is 0 almost at every iteration, so there is no need in loading B[i] at
-; all.
-
-
-; CHECK-LABEL: @unroll_dce
-; CHECK-NOT: br i1 %exitcond, label %for.end, label %for.body
-define i32 @unroll_dce(i32* noalias nocapture readonly %b) {
-entry:
- br label %for.body
-
-for.body: ; preds = %for.body, %entry
- %iv.0 = phi i64 [ 0, %entry ], [ %iv.1, %for.body ]
- %r.0 = phi i32 [ 0, %entry ], [ %r.1, %for.body ]
- %arrayidx1 = getelementptr inbounds [10 x i32], [10 x i32]* @known_constant, i64 0, i64 %iv.0
- %x1 = load i32, i32* %arrayidx1, align 4
- %arrayidx2 = getelementptr inbounds i32, i32* %b, i64 %iv.0
- %x2 = load i32, i32* %arrayidx2, align 4
- %mul = mul i32 %x1, %x2
- %r.1 = add i32 %mul, %r.0
- %iv.1 = add nuw nsw i64 %iv.0, 1
- %exitcond = icmp eq i64 %iv.1, 10
- br i1 %exitcond, label %for.end, label %for.body
-
-for.end: ; preds = %for.body
- ret i32 %r.1
-}
OpenPOWER on IntegriCloud