summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-20 01:17:19 +0000
committerChris Lattner <sabre@nondot.org>2004-07-20 01:17:19 +0000
commitc6c9db2fd7a8039f01a103cd5f5b0eae3858a870 (patch)
treeae484ebe9e8b122626d8395836da0b4277461fa4 /test
parentba1c1da36ab778fe3c5b9a8c9fb0d0f0b0e0089e (diff)
downloadllvm-c6c9db2fd7a8039f01a103cd5f5b0eae3858a870.tar.gz
llvm-c6c9db2fd7a8039f01a103cd5f5b0eae3858a870.tar.bz2
llvm-c6c9db2fd7a8039f01a103cd5f5b0eae3858a870.tar.xz
test that unconditional branches to unwinds are always eliminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/SimplifyCFG/BrUnwind.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/BrUnwind.ll b/test/Transforms/SimplifyCFG/BrUnwind.ll
new file mode 100644
index 0000000000..64264175ae
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/BrUnwind.ll
@@ -0,0 +1,12 @@
+;RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br label'
+void %test(bool %C) {
+ br bool %C, label %A, label %B
+A:
+ call void %test(bool %C)
+ br label %X
+B:
+ call void %test(bool %C)
+ br label %X
+X:
+ unwind
+}