summaryrefslogtreecommitdiff
path: root/test/Transforms/LoopIdiom/sideeffect.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/sideeffect.ll
parentd295c9729d04727666c84c4a184e8ce796dd9974 (diff)
downloadllvm-a864748284f4bab974ffb13b840a611c1f9bc7ac.tar.gz
llvm-a864748284f4bab974ffb13b840a611c1f9bc7ac.tar.bz2
llvm-a864748284f4bab974ffb13b840a611c1f9bc7ac.tar.xz
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/sideeffect.ll')
-rw-r--r--test/Transforms/LoopIdiom/sideeffect.ll53
1 files changed, 0 insertions, 53 deletions
diff --git a/test/Transforms/LoopIdiom/sideeffect.ll b/test/Transforms/LoopIdiom/sideeffect.ll
deleted file mode 100644
index 460e5233f9..0000000000
--- a/test/Transforms/LoopIdiom/sideeffect.ll
+++ /dev/null
@@ -1,53 +0,0 @@
-; RUN: opt -basicaa -loop-idiom < %s -S | FileCheck %s
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-target triple = "x86_64-apple-darwin10.0.0"
-
-; PR9481
-define i32 @test1() nounwind uwtable ssp {
-entry:
- %a = alloca [10 x i8], align 1
- br label %for.body
-
-for.cond1.preheader: ; preds = %for.body
- %arrayidx5.phi.trans.insert = getelementptr inbounds [10 x i8]* %a, i64 0, i64 0
- %.pre = load i8* %arrayidx5.phi.trans.insert, align 1
- br label %for.body3
-
-for.body: ; preds = %for.body, %entry
- %indvars.iv29 = phi i64 [ 0, %entry ], [ %indvars.iv.next30, %for.body ]
- call void (...)* @bar() nounwind
- %arrayidx = getelementptr inbounds [10 x i8]* %a, i64 0, i64 %indvars.iv29
- store i8 23, i8* %arrayidx, align 1
- %indvars.iv.next30 = add i64 %indvars.iv29, 1
- %lftr.wideiv31 = trunc i64 %indvars.iv.next30 to i32
- %exitcond32 = icmp eq i32 %lftr.wideiv31, 1000000
- br i1 %exitcond32, label %for.cond1.preheader, label %for.body
-
-for.body3: ; preds = %for.body3, %for.cond1.preheader
- %0 = phi i8 [ %.pre, %for.cond1.preheader ], [ %add, %for.body3 ]
- %indvars.iv = phi i64 [ 1, %for.cond1.preheader ], [ %indvars.iv.next, %for.body3 ]
- call void (...)* @bar() nounwind
- %arrayidx7 = getelementptr inbounds [10 x i8]* %a, i64 0, i64 %indvars.iv
- %1 = load i8* %arrayidx7, align 1
- %add = add i8 %1, %0
- store i8 %add, i8* %arrayidx7, align 1
- %indvars.iv.next = add i64 %indvars.iv, 1
- %lftr.wideiv = trunc i64 %indvars.iv.next to i32
- %exitcond = icmp eq i32 %lftr.wideiv, 1000000
- br i1 %exitcond, label %for.end12, label %for.body3
-
-for.end12: ; preds = %for.body3
- %arrayidx13 = getelementptr inbounds [10 x i8]* %a, i64 0, i64 2
- %2 = load i8* %arrayidx13, align 1
- %conv14 = sext i8 %2 to i32
- %arrayidx15 = getelementptr inbounds [10 x i8]* %a, i64 0, i64 6
- %3 = load i8* %arrayidx15, align 1
- %conv16 = sext i8 %3 to i32
- %add17 = add nsw i32 %conv16, %conv14
- ret i32 %add17
-
-; CHECK: @test1
-; CHECK-NOT: @llvm.memset
-}
-
-declare void @bar(...)