summaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyCFG/branch-phi-thread.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-20 00:41:55 +0000
committerChris Lattner <sabre@nondot.org>2005-09-20 00:41:55 +0000
commitecd7b6d110dfd6a00a86c3be5aef330d52b813ac (patch)
tree0ed956b4d53c2926a8ae081e9f4340ce9b1c8cec /test/Transforms/SimplifyCFG/branch-phi-thread.ll
parent9c88d9816246d260b37cdc689f313c56aec6941e (diff)
downloadllvm-ecd7b6d110dfd6a00a86c3be5aef330d52b813ac.tar.gz
llvm-ecd7b6d110dfd6a00a86c3be5aef330d52b813ac.tar.bz2
llvm-ecd7b6d110dfd6a00a86c3be5aef330d52b813ac.tar.xz
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG/branch-phi-thread.ll')
-rw-r--r--test/Transforms/SimplifyCFG/branch-phi-thread.ll20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/Transforms/SimplifyCFG/branch-phi-thread.ll b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
index 9098376ba4..2da837d73b 100644
--- a/test/Transforms/SimplifyCFG/branch-phi-thread.ll
+++ b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
@@ -1,4 +1,5 @@
-; RUN: llvm-as < %s | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1'
+; RUN: llvm-as < %s | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1' &&
+; RUN: llvm-as < %s | opt -simplifycfg -adce -disable-output
declare void %f1()
declare void %f2()
declare void %f3()
@@ -6,6 +7,23 @@ declare void %f4()
implementation
+int %test1(int %X, bool %D) {
+E:
+ %C = seteq int %X, 0
+ br bool %C, label %T, label %F
+T:
+ br bool %C, 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
+}
+
int %test2(int %X, bool %D) {
E:
%C = seteq int %X, 0