aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-15 07:29:29 +0000
committerChris Lattner <sabre@nondot.org>2007-01-15 07:29:29 +0000
commit151becec7eb7d79da1d4f3c3cbdcd26c1284ff5c (patch)
tree785c355a1bebfaebd30c3faa8c9da6f549dad66f
parent76b7a06a75e5f677d43cb1c0f1cc27280e81626c (diff)
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33233 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/InstCombine/phi.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/phi.ll b/test/Transforms/InstCombine/phi.ll
index 296e2e5369..44841b7643 100644
--- a/test/Transforms/InstCombine/phi.ll
+++ b/test/Transforms/InstCombine/phi.ll
@@ -1,6 +1,7 @@
; This test makes sure that these instructions are properly eliminated.
;
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep phi
implementation
@@ -65,3 +66,14 @@ BB2:
ret uint %B
}
+int %test7(int %A, bool %b) {
+BB0: br label %Loop
+
+Loop:
+ %B = phi int [%A, %BB0], [%C, %Loop] ; PHI is dead.
+ %C = add int %B, 123
+ br bool %b, label %Loop, label %Exit
+Exit:
+ ret int 0
+}
+