summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopRotate/crash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-11 07:47:59 +0000
committerChris Lattner <sabre@nondot.org>2011-01-11 07:47:59 +0000
commit63fe78de68c23135acc1888b337221812ca76e56 (patch)
tree963c6a2bfc2938913d8c7942be61949d98db21ab /llvm/test/Transforms/LoopRotate/crash.ll
parent23109cb319da7fab604c3f76eae0869c8045dae7 (diff)
downloadbcm5719-llvm-63fe78de68c23135acc1888b337221812ca76e56.tar.gz
bcm5719-llvm-63fe78de68c23135acc1888b337221812ca76e56.zip
remove a bogus assertion: the latch block of a loop is not
neccesarily an uncond branch to the header. This fixes PR8955 (the assertion tripping). llvm-svn: 123219
Diffstat (limited to 'llvm/test/Transforms/LoopRotate/crash.ll')
-rw-r--r--llvm/test/Transforms/LoopRotate/crash.ll31
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoopRotate/crash.ll b/llvm/test/Transforms/LoopRotate/crash.ll
new file mode 100644
index 00000000000..d9dc803cd11
--- /dev/null
+++ b/llvm/test/Transforms/LoopRotate/crash.ll
@@ -0,0 +1,31 @@
+; RUN: opt -loop-rotate %s -disable-output
+
+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"
+
+; PR8955 - Rotating an outer loop that has a condbr for a latch block.
+define void @test1() nounwind ssp {
+entry:
+ br label %lbl_283
+
+lbl_283: ; preds = %if.end, %entry
+ br i1 undef, label %if.else, label %if.then
+
+if.then: ; preds = %lbl_283
+ br i1 undef, label %if.end, label %for.condthread-pre-split
+
+for.condthread-pre-split: ; preds = %if.then
+ br label %for.cond
+
+for.cond: ; preds = %for.cond, %for.condthread-pre-split
+ br i1 undef, label %lbl_281, label %for.cond
+
+lbl_281: ; preds = %if.end, %for.cond
+ br label %if.end
+
+if.end: ; preds = %lbl_281, %if.then
+ br i1 undef, label %lbl_283, label %lbl_281
+
+if.else: ; preds = %lbl_283
+ ret void
+}
OpenPOWER on IntegriCloud