summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/invoke-donothing-assert.ll
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-02-27 02:11:57 +0000
committerManman Ren <mren@apple.com>2013-02-27 02:11:57 +0000
commit5e5974f51ad079a3ed890ca8be1d3f50150320ad (patch)
tree25211bf8cdf0c2ad77a6d145f84c2103d499bf8e /test/CodeGen/ARM/invoke-donothing-assert.ll
parent06df83c25a7b07b3a19a40bd680c0a205bcc0b9a (diff)
downloadllvm-5e5974f51ad079a3ed890ca8be1d3f50150320ad.tar.gz
llvm-5e5974f51ad079a3ed890ca8be1d3f50150320ad.tar.bz2
llvm-5e5974f51ad079a3ed890ca8be1d3f50150320ad.tar.xz
SelectionDAG: If llvm.donothing has a landingpad, we should clear
CurrentCallSite to avoid an assertion failure: assert(MMI.getCurrentCallSite() == 0 && "Overlapping call sites!"); rdar://problem/13228754 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176154 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/invoke-donothing-assert.ll')
-rw-r--r--test/CodeGen/ARM/invoke-donothing-assert.ll40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/invoke-donothing-assert.ll b/test/CodeGen/ARM/invoke-donothing-assert.ll
new file mode 100644
index 0000000000..d0c98f8028
--- /dev/null
+++ b/test/CodeGen/ARM/invoke-donothing-assert.ll
@@ -0,0 +1,40 @@
+; RUN: llc < %s -mtriple=armv7-apple-ios | FileCheck %s
+; This testcase makes sure we can handle invoke @llvm.donothing without
+; assertion failure.
+; rdar://problem/13228754
+; CHECK: .globl _main
+
+declare void @callA()
+declare i32 @__gxx_personality_sj0(...)
+
+define void @main() {
+invoke.cont:
+ invoke void @callA()
+ to label %invoke.cont25 unwind label %lpad2
+invoke.cont25:
+ invoke void @llvm.donothing()
+ to label %invoke.cont27 unwind label %lpad15
+
+invoke.cont27:
+ invoke void @callB()
+ to label %invoke.cont75 unwind label %lpad15
+
+invoke.cont75:
+ ret void
+
+lpad2:
+ %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
+ cleanup
+ br label %eh.resume
+
+lpad15:
+ %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
+ cleanup
+ br label %eh.resume
+
+eh.resume:
+ resume { i8*, i32 } zeroinitializer
+}
+
+declare void @callB()
+declare void @llvm.donothing() nounwind readnone