diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-18 04:06:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-18 04:06:41 +0000 |
commit | d7e30973cdf378d50b862431fc96128b1df81416 (patch) | |
tree | 00f0eb489362b5588f052827020c08f6fb38191f | |
parent | f405d107d83d934f5c38ac41866695dd7efe527d (diff) | |
download | external_llvm-d7e30973cdf378d50b862431fc96128b1df81416.zip external_llvm-d7e30973cdf378d50b862431fc96128b1df81416.tar.gz external_llvm-d7e30973cdf378d50b862431fc96128b1df81416.tar.bz2 |
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17115 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/SimplifyCFG/UnreachableEliminate.ll | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/UnreachableEliminate.ll b/test/Transforms/SimplifyCFG/UnreachableEliminate.ll new file mode 100644 index 0000000..09c41a9 --- /dev/null +++ b/test/Transforms/SimplifyCFG/UnreachableEliminate.ll @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep unreachable + +void %test1(bool %C, bool* %BP) { + br bool %C, label %T, label %F +T: + store bool %C, bool* %BP ;; dead + unreachable +F: + ret void +} + +void %test2() { + invoke void %test2() to label %N unwind label %U +U: + unreachable +N: + ret void +} + +int %test3(int %v) { + switch int %v, label %default [ int 1, label %U + int 2, label %T] +default: + ret int 1 +U: + unreachable +T: + ret int 2 +} |