summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-09 07:25:58 +0000
committerChris Lattner <sabre@nondot.org>2011-04-09 07:25:58 +0000
commitf5bf464b701908d16f7cee0bbf2b8c8df4f3a917 (patch)
tree779548dfee216513ce90ab3ddb941d71402f762e /test
parent0403b473dd99b5c7db1fa7048288be6cb42e7abd (diff)
downloadllvm-f5bf464b701908d16f7cee0bbf2b8c8df4f3a917.tar.gz
llvm-f5bf464b701908d16f7cee0bbf2b8c8df4f3a917.tar.bz2
llvm-f5bf464b701908d16f7cee0bbf2b8c8df4f3a917.tar.xz
fix PR9523, a crash in looprotate on a non-canonical loop made out of indirectbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/LoopRotate/crash.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/LoopRotate/crash.ll b/test/Transforms/LoopRotate/crash.ll
index 9dc9862d15..16a6868f8f 100644
--- a/test/Transforms/LoopRotate/crash.ll
+++ b/test/Transforms/LoopRotate/crash.ll
@@ -137,3 +137,19 @@ bb17: ; preds = %bb15
}
+
+
+; PR9523 - Non-canonical loop.
+define void @test7(i8* %P) nounwind {
+entry:
+ indirectbr i8* %P, [label %"3", label %"5"]
+
+"3": ; preds = %"4", %entry
+ br i1 undef, label %"5", label %"4"
+
+"4": ; preds = %"3"
+ br label %"3"
+
+"5": ; preds = %"3", %entry
+ ret void
+}