1 ; RUN: opt -passes=sink -S < %s | FileCheck %s
3 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
4 target triple = "i686-pc-windows-msvc"
6 define void @h() personality ptr @__CxxFrameHandler3 {
8 %call = call i32 @g(i32 1) readnone
9 invoke void @_CxxThrowException(ptr null, ptr null) noreturn
10 to label %unreachable unwind label %catch.dispatch
12 catch.dispatch: ; preds = %entry
13 %cs = catchswitch within none [label %catch] unwind to caller
15 catch: ; preds = %catch.dispatch
16 %cp = catchpad within %cs [ptr null, i32 64, ptr null]
17 catchret from %cp to label %try.cont
19 try.cont: ; preds = %catch
20 call void @k(i32 %call)
23 unreachable: ; preds = %entry
27 declare x86_stdcallcc void @_CxxThrowException(ptr, ptr)
29 declare i32 @__CxxFrameHandler3(...)
31 declare i32 @g(i32) readnone
35 ; CHECK-LABEL: define void @h(
36 ; CHECK: call i32 @g(i32 1)
37 ; CHECK-NEXT: invoke void @_CxxThrowException(