summaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-09-05 12:57:57 +0000
committerDuncan Sands <baldrick@free.fr>2011-09-05 12:57:57 +0000
commitad99ef8bf59adf151ac217e3b2ae6abec41f76e6 (patch)
tree95d1067b110688a8e72e7579793db5abfed6b146 /test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll
parentdabc2806726a286b00313419fac8461ebe0f774c (diff)
downloadexternal_llvm-ad99ef8bf59adf151ac217e3b2ae6abec41f76e6.zip
external_llvm-ad99ef8bf59adf151ac217e3b2ae6abec41f76e6.tar.gz
external_llvm-ad99ef8bf59adf151ac217e3b2ae6abec41f76e6.tar.bz2
Delete trivial landing pads that just continue unwinding the caught
exception. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll')
-rw-r--r--test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll b/test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll
new file mode 100644
index 0000000..7558419
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll
@@ -0,0 +1,22 @@
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
+; CHECK-NOT: invoke
+; CHECK-NOT: landingpad
+
+declare void @bar()
+
+define i32 @foo() {
+entry:
+ invoke void @bar()
+ to label %return unwind label %lpad
+
+return:
+ ret i32 0
+
+lpad:
+ %lp = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0
+ cleanup
+ resume { i8*, i32 } %lp
+}
+
+declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*)