new testcase
authorChris Lattner <sabre@nondot.org>
Fri, 23 Sep 2005 18:43:57 +0000 (18:43 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 23 Sep 2005 18:43:57 +0000 (18:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23409 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/SimplifyCFG/branch-fold.ll [new file with mode: 0644]

diff --git a/test/Transforms/SimplifyCFG/branch-fold.ll b/test/Transforms/SimplifyCFG/branch-fold.ll
new file mode 100644 (file)
index 0000000..8bd137c
--- /dev/null
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep 'br bool' | wc -l | grep 1
+
+void %test(int* %P, int* %Q, bool %A, bool %B) {
+       br bool %A, label %a, label %b   ;; fold the two branches into one
+a:
+       br bool %B, label %b, label %c
+b:
+       store int 123, int* %P
+       ret void
+c:
+       ret void
+}