summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-05 16:11:36 +0000
committerChris Lattner <sabre@nondot.org>2003-08-05 16:11:36 +0000
commit5d6bdae11811a4e540675c47c5b81935f3f35695 (patch)
tree6795c7aa8b180e19e29c7da49970870d78425ffa /test
parentf4de7835822e39b5cd9f060ee350917067ffd8b8 (diff)
downloadllvm-5d6bdae11811a4e540675c47c5b81935f3f35695.tar.gz
llvm-5d6bdae11811a4e540675c47c5b81935f3f35695.tar.bz2
llvm-5d6bdae11811a4e540675c47c5b81935f3f35695.tar.xz
new testcases that simplifycfg breaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll9
-rw-r--r--test/Transforms/SimplifyCFG/2003-08-05-MishandleInvoke.ll10
2 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll b/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
new file mode 100644
index 0000000000..0dafdd9e66
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
@@ -0,0 +1,9 @@
+; Do not remove the invoke!
+;
+; RUN: as < %s | opt -simplifycfg -disable-output
+
+int %test() {
+ %A = invoke int %test() to label %Ret except label %Ret
+Ret:
+ ret int %A
+}
diff --git a/test/Transforms/SimplifyCFG/2003-08-05-MishandleInvoke.ll b/test/Transforms/SimplifyCFG/2003-08-05-MishandleInvoke.ll
new file mode 100644
index 0000000000..25deb3b362
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/2003-08-05-MishandleInvoke.ll
@@ -0,0 +1,10 @@
+; Do not remove the invoke!
+;
+; RUN: as < %s | opt -simplifycfg | dis | grep invoke
+
+int %test() {
+ invoke int %test() to label %Ret except label %Ret
+Ret:
+ %A = add int 0, 1
+ ret int %A
+}