aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LoopIdiom/basic.ll
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-11-02 08:33:25 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-11-02 08:33:25 +0000
commita864748284f4bab974ffb13b840a611c1f9bc7ac (patch)
treeefa83992f67fa1c80bc3023a0c357bb0627852f7 /test/Transforms/LoopIdiom/basic.ll
parentd295c9729d04727666c84c4a184e8ce796dd9974 (diff)
downloadexternal_llvm-a864748284f4bab974ffb13b840a611c1f9bc7ac.zip
external_llvm-a864748284f4bab974ffb13b840a611c1f9bc7ac.tar.gz
external_llvm-a864748284f4bab974ffb13b840a611c1f9bc7ac.tar.bz2
Revert the switch of loop-idiom to use the new dependence analysis.
The new analysis is not yet ready for prime time. It has a *critical* flawed assumption, and some troubling shortages of testing. Until it's been hammered into better shape, let's stick with the working code. This should be easy to revert itself when the analysis is ready. Fixes PR14241, a miscompile of any memcpy-able loop which uses a pointer as the induction mechanism. If you have been seeing miscompiles in this revision range, you really want to test with this backed out. The results of this miscompile are a bit subtle as they can lead to downstream passes concluding things are impossible which are in fact possible. Thanks to David Blaikie for the majority of the reduction of this miscompile. I'll be checking in the test case in a non-revert commit. Revesions reverted here: r167045: LoopIdiom: Fix a serious missed optimization: we only turned top-level loops into memmove. r166877: LoopIdiom: Add checks to avoid turning memmove into an infinite loop. r166875: LoopIdiom: Recognize memmove loops. r166874: LoopIdiom: Replace custom dependence analysis with DependenceAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LoopIdiom/basic.ll')
-rw-r--r--test/Transforms/LoopIdiom/basic.ll22
1 files changed, 0 insertions, 22 deletions
diff --git a/test/Transforms/LoopIdiom/basic.ll b/test/Transforms/LoopIdiom/basic.ll
index 5afc405..46ab7e5 100644
--- a/test/Transforms/LoopIdiom/basic.ll
+++ b/test/Transforms/LoopIdiom/basic.ll
@@ -383,26 +383,4 @@ for.end: ; preds = %for.inc
}
-@p = common global [1024 x i8] zeroinitializer, align 16
-define void @test15(i32 %n) nounwind {
-entry:
- %cmp6 = icmp eq i32 %n, 0
- br i1 %cmp6, label %for.end, label %for.body
-
-for.body: ; preds = %entry, %for.body
- %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
- %indvars.iv.next = add i64 %indvars.iv, 1
- %arrayidx = getelementptr inbounds [1024 x i8]* @p, i64 0, i64 %indvars.iv.next
- %0 = load i8* %arrayidx, align 1
- %arrayidx2 = getelementptr inbounds [1024 x i8]* @p, i64 0, i64 %indvars.iv
- store i8 %0, i8* %arrayidx2, align 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
- ret void
-; CHECK: @test15
-; CHECK: call void @llvm.memmove.p0i8.p0i8.i64(i8* getelementptr inbounds ([1024 x i8]* @p, i32 0, i32 0), i8* getelementptr inbounds ([1024 x i8]* @p, i64 0, i64 1),
-}