aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-03-09 07:50:37 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-03-09 07:50:37 +0000
commit3f4cc3101e4c6cccd2ecc2604205ff819fcfa40f (patch)
tree2ecde0446598f04f84b6789224e92b6f89ce9afb /test/Transforms/SimplifyCFG
parent8dc023f684216ecfae816cff370a40de8437300e (diff)
downloadexternal_llvm-3f4cc3101e4c6cccd2ecc2604205ff819fcfa40f.zip
external_llvm-3f4cc3101e4c6cccd2ecc2604205ff819fcfa40f.tar.gz
external_llvm-3f4cc3101e4c6cccd2ecc2604205ff819fcfa40f.tar.bz2
Firstly, having a BranchInst isn't exclusive with having an unwind_to.
Secondly, we have to check whether the branch is actually pointing to the block with the unwind in it. We could have gotten here because of the unwind_to alone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG')
-rw-r--r--test/Transforms/SimplifyCFG/unwindto.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/unwindto.ll b/test/Transforms/SimplifyCFG/unwindto.ll
index 28d9d1e..4e91c83 100644
--- a/test/Transforms/SimplifyCFG/unwindto.ll
+++ b/test/Transforms/SimplifyCFG/unwindto.ll
@@ -41,3 +41,21 @@ entry: unwind_to %cleanup
cleanup:
unwind
}
+
+define i32 @f4() {
+entry: unwind_to %cleanup
+ call void @g(i32 0)
+ br label %cleanup
+cleanup:
+ unwind
+}
+
+define i32 @f5() {
+entry: unwind_to %cleanup
+ call void @g(i32 0)
+ br label %other
+other:
+ ret i32 0
+cleanup:
+ unwind
+}