aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Generic/badlive.ll
diff options
context:
space:
mode:
authorShih-wei Liao <sliao@google.com>2010-02-10 11:10:31 -0800
committerShih-wei Liao <sliao@google.com>2010-02-10 11:10:31 -0800
commite264f62ca09a8f65c87a46d562a4d0f9ec5d457e (patch)
tree59e3d57ef656cef79afa708ae0a3daf25cd91fcf /test/CodeGen/Generic/badlive.ll
downloadexternal_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.zip
external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.tar.gz
external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.tar.bz2
Check in LLVM r95781.
Diffstat (limited to 'test/CodeGen/Generic/badlive.ll')
-rw-r--r--test/CodeGen/Generic/badlive.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/badlive.ll b/test/CodeGen/Generic/badlive.ll
new file mode 100644
index 0000000..43b03e3
--- /dev/null
+++ b/test/CodeGen/Generic/badlive.ll
@@ -0,0 +1,28 @@
+; RUN: llc < %s
+
+define i32 @main() {
+bb0:
+ %reg109 = malloc i32, i32 100 ; <i32*> [#uses=2]
+ br label %bb2
+
+bb2: ; preds = %bb2, %bb0
+ %cann-indvar1 = phi i32 [ 0, %bb0 ], [ %add1-indvar1, %bb2 ] ; <i32> [#uses=2]
+ %reg127 = mul i32 %cann-indvar1, 2 ; <i32> [#uses=1]
+ %add1-indvar1 = add i32 %cann-indvar1, 1 ; <i32> [#uses=1]
+ store i32 999, i32* %reg109
+ %cond1015 = icmp sle i32 1, 99 ; <i1> [#uses=1]
+ %reg128 = add i32 %reg127, 2 ; <i32> [#uses=0]
+ br i1 %cond1015, label %bb2, label %bb4
+
+bb4: ; preds = %bb4, %bb2
+ %cann-indvar = phi i32 [ %add1-indvar, %bb4 ], [ 0, %bb2 ] ; <i32> [#uses=1]
+ %add1-indvar = add i32 %cann-indvar, 1 ; <i32> [#uses=2]
+ store i32 333, i32* %reg109
+ %reg131 = add i32 %add1-indvar, 3 ; <i32> [#uses=1]
+ %cond1017 = icmp ule i32 %reg131, 99 ; <i1> [#uses=1]
+ br i1 %cond1017, label %bb4, label %bb5
+
+bb5: ; preds = %bb4
+ ret i32 0
+}
+