aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/Mem2Reg
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-18 19:22:39 +0000
committerChris Lattner <sabre@nondot.org>2003-04-18 19:22:39 +0000
commitbcecb4baf9cbf32a4dc8da248d893166c3c17b73 (patch)
tree1f35794019906aba4831b0dbea79adf791e8f518 /test/Transforms/Mem2Reg
parent156bcf3f65c9d36dabc1b86e341d5ee08c24a33e (diff)
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/Mem2Reg')
-rw-r--r--test/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll b/test/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll
new file mode 100644
index 0000000000..8a3dc1e805
--- /dev/null
+++ b/test/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll
@@ -0,0 +1,17 @@
+; This testcases makes sure that mem2reg can handle unreachable blocks.
+; RUN: as < %s | opt -mem2reg
+
+int %test() {
+ %X = alloca int
+
+ store int 6, int* %X
+ br label %Loop
+Loop:
+ store int 5, int* %X
+ br label %EndOfLoop
+Unreachable:
+ br label %EndOfLoop
+
+EndOfLoop:
+ br label %Loop
+}