blob: 59ccf6be092b38ea1d5bf67248f5e17a43fedf91 [file] [log] [blame]
Nuno Lopesec9653b2012-06-28 22:30:12 +00001; RUN: llc < %s | FileCheck %s
2
3declare i32 @__gxx_personality_v0(...)
4declare void @__cxa_call_unexpected(i8*)
5declare void @llvm.donothing() readnone
6
7; CHECK: f1
David Majnemer7fddecc2015-06-17 20:52:32 +00008define void @f1() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
Nuno Lopesec9653b2012-06-28 22:30:12 +00009entry:
Benjamin Kramer2f47a3f2012-08-17 12:28:26 +000010; CHECK-NOT: donothing
Nuno Lopesec9653b2012-06-28 22:30:12 +000011 invoke void @llvm.donothing()
12 to label %invoke.cont unwind label %lpad
13
14invoke.cont:
15 ret void
16
17lpad:
David Majnemer7fddecc2015-06-17 20:52:32 +000018 %0 = landingpad { i8*, i32 }
Nuno Lopesec9653b2012-06-28 22:30:12 +000019 filter [0 x i8*] zeroinitializer
20 %1 = extractvalue { i8*, i32 } %0, 0
21 tail call void @__cxa_call_unexpected(i8* %1) noreturn nounwind
22 unreachable
23}
24
25; CHECK: f2
26define void @f2() nounwind {
27entry:
Benjamin Kramer2f47a3f2012-08-17 12:28:26 +000028; CHECK-NOT: donothing
Nuno Lopesec9653b2012-06-28 22:30:12 +000029 call void @llvm.donothing()
30 ret void
31}