summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-19 23:48:04 +0000
committerChris Lattner <sabre@nondot.org>2005-09-19 23:48:04 +0000
commitb6e2b7e4cd2b40954ff387907b149e9fb6b304ae (patch)
tree08ba22430b40ecaa62f2f6845cd0c64c0252b8c1 /test
parent44728a7bb65f5228fff631da807ed7ed3c791a8d (diff)
downloadllvm-b6e2b7e4cd2b40954ff387907b149e9fb6b304ae.tar.gz
llvm-b6e2b7e4cd2b40954ff387907b149e9fb6b304ae.tar.bz2
llvm-b6e2b7e4cd2b40954ff387907b149e9fb6b304ae.tar.xz
new testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/SimplifyCFG/branch-phi-thread.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/branch-phi-thread.ll b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
new file mode 100644
index 0000000000..9098376ba4
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-as < %s | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1'
+declare void %f1()
+declare void %f2()
+declare void %f3()
+declare void %f4()
+
+implementation
+
+int %test2(int %X, bool %D) {
+E:
+ %C = seteq int %X, 0
+ br bool %C, label %T, label %F
+T:
+ %P = phi bool [true, %E], [%C, %A]
+ br bool %P, label %B, label %A
+A:
+ call void %f1()
+ br bool %D, label %T, label %F
+B:
+ call void %f2()
+ ret int 345
+F:
+ call void %f3()
+ ret int 123
+}
+