aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-10 21:41:47 +0000
committerChris Lattner <sabre@nondot.org>2004-03-10 21:41:47 +0000
commita22ef48fee87843f53237a4812a4512e9820bde8 (patch)
tree367eef2f58a99a55e2bd3502f3f98d421791abf1
parent5d728531736f6224cf49e38ed49f0c784e3e5a0c (diff)
New testcase for PR284: [indvars] Induction variable analysis violates LLVM invariants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12274 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/IndVarsSimplify/2004-03-10-PHIInsertionBug.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Transforms/IndVarsSimplify/2004-03-10-PHIInsertionBug.ll b/test/Transforms/IndVarsSimplify/2004-03-10-PHIInsertionBug.ll
new file mode 100644
index 0000000000..dda6d9d4d2
--- /dev/null
+++ b/test/Transforms/IndVarsSimplify/2004-03-10-PHIInsertionBug.ll
@@ -0,0 +1,27 @@
+; RUN: llvm-as < %s | opt -indvars -disable-output
+
+implementation ; Functions:
+
+void %test() {
+ br label %endif.0.i
+
+endif.0.i: ; preds = %then.0.i
+ br bool false, label %then.3.i, label %endif.3.i
+
+then.3.i: ; preds = %endif.0.i
+ br label %endif.3.i
+
+endif.3.i: ; preds = %endif.0.i, %then.3.i
+ %inxm.0.i = phi int [ 8, %then.3.i ], [ 0, %endif.0.i ]
+ %doinner.1.i = phi int [ 0, %then.3.i ], [ 0, %endif.0.i ]
+ br label %loopentry.2.i
+
+loopentry.2.i: ; preds = %endif.3.i, %no_exit.2.i
+ %inxk.0.i = phi int [ %tmp.210.i, %no_exit.2.i ], [ 0, %endif.3.i ]
+ br label %no_exit.2.i
+
+no_exit.2.i: ; preds = %loopentry.2.i
+ %tmp.210.i = sub int %inxk.0.i, %inxm.0.i
+ %tmp.213.i = add int %tmp.210.i, 0
+ br label %loopentry.2.i
+}