blob: 559f629ff9e05e283cd6d4cea3c406586faa03cc [file] [log] [blame]
Chris Lattner02f7e712003-12-10 20:18:09 +00001; This testcase was reduced from Shootout-C++/reversefile.cpp by bugpoint
2
Dan Gohman18800922009-09-11 18:01:28 +00003; RUN: opt < %s -lowerinvoke -disable-output
Chris Lattner02f7e712003-12-10 20:18:09 +00004
Tanya Lattnerab7872c2008-03-19 07:28:33 +00005declare void @baz()
Chris Lattner02f7e712003-12-10 20:18:09 +00006
Tanya Lattnerab7872c2008-03-19 07:28:33 +00007declare void @bar()
Chris Lattner02f7e712003-12-10 20:18:09 +00008
David Majnemer7fddecc2015-06-17 20:52:32 +00009define void @foo() personality i32 (...)* @__gxx_personality_v0 {
Tanya Lattnerab7872c2008-03-19 07:28:33 +000010then:
11 invoke void @baz( )
12 to label %invoke_cont.0 unwind label %try_catch
Chris Lattner02f7e712003-12-10 20:18:09 +000013invoke_cont.0: ; preds = %then
Tanya Lattnerab7872c2008-03-19 07:28:33 +000014 invoke void @bar( )
15 to label %try_exit unwind label %try_catch
16try_catch: ; preds = %invoke_cont.0, %then
17 %__tmp.0 = phi i32* [ null, %invoke_cont.0 ], [ null, %then ] ; <i32*> [#uses=0]
David Majnemer7fddecc2015-06-17 20:52:32 +000018 %res = landingpad { i8* }
Duncan P. N. Exon Smith49e6a702015-03-27 22:04:28 +000019 cleanup
Chris Lattner02f7e712003-12-10 20:18:09 +000020 ret void
Chris Lattner02f7e712003-12-10 20:18:09 +000021try_exit: ; preds = %invoke_cont.0
22 ret void
23}
Tanya Lattnerab7872c2008-03-19 07:28:33 +000024
Duncan P. N. Exon Smith49e6a702015-03-27 22:04:28 +000025declare i32 @__gxx_personality_v0(...)