1*f4a2713aSLionel Sambuc; RUN: llc < %s -mtriple=i386-pc-mingw32 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambucdefine void @func() nounwind { 4*f4a2713aSLionel Sambucinvoke.cont: 5*f4a2713aSLionel Sambuc %call = tail call i8* @malloc() 6*f4a2713aSLionel Sambuc %a = invoke i32 @bar() 7*f4a2713aSLionel Sambuc to label %bb1 unwind label %lpad 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambucbb1: 10*f4a2713aSLionel Sambuc ret void 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuclpad: 13*f4a2713aSLionel Sambuc %exn.ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) 14*f4a2713aSLionel Sambuc catch i8* null 15*f4a2713aSLionel Sambuc %exn = extractvalue { i8*, i32 } %exn.ptr, 0 16*f4a2713aSLionel Sambuc %eh.selector = extractvalue { i8*, i32 } %exn.ptr, 1 17*f4a2713aSLionel Sambuc %ehspec.fails = icmp slt i32 %eh.selector, 0 18*f4a2713aSLionel Sambuc br i1 %ehspec.fails, label %ehspec.unexpected, label %cleanup 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuccleanup: 21*f4a2713aSLionel Sambuc resume { i8*, i32 } %exn.ptr 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambucehspec.unexpected: 24*f4a2713aSLionel Sambuc tail call void @__cxa_call_unexpected(i8* %exn) noreturn nounwind 25*f4a2713aSLionel Sambuc unreachable 26*f4a2713aSLionel Sambuc} 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambucdeclare noalias i8* @malloc() 29*f4a2713aSLionel Sambuc 30*f4a2713aSLionel Sambucdeclare i32 @__gxx_personality_v0(...) 31*f4a2713aSLionel Sambuc 32*f4a2713aSLionel Sambucdeclare void @_Unwind_Resume_or_Rethrow(i8*) 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambucdeclare void @__cxa_call_unexpected(i8*) 35*f4a2713aSLionel Sambuc 36*f4a2713aSLionel Sambucdeclare i32 @bar() 37