brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 3693099 Raw
38 lines · plain
1; RUN: opt -passes=sink -S < %s | FileCheck %s2 3target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"4target triple = "i686-pc-windows-msvc"5 6define void @h() personality ptr @__CxxFrameHandler3 {7entry:8  %call = call i32 @g(i32 1) readnone9  invoke void @_CxxThrowException(ptr null, ptr null) noreturn10          to label %unreachable unwind label %catch.dispatch11 12catch.dispatch:                                   ; preds = %entry13  %cs = catchswitch within none [label %catch] unwind to caller14 15catch:                                            ; preds = %catch.dispatch16  %cp = catchpad within %cs [ptr null, i32 64, ptr null]17  catchret from %cp to label %try.cont18 19try.cont:                                         ; preds = %catch20  call void @k(i32 %call)21  ret void22 23unreachable:                                      ; preds = %entry24  unreachable25}26 27declare x86_stdcallcc void @_CxxThrowException(ptr, ptr)28 29declare i32 @__CxxFrameHandler3(...)30 31declare i32 @g(i32) readnone32 33declare void @k(i32)34 35; CHECK-LABEL: define void @h(36; CHECK: call i32 @g(i32 1)37; CHECK-NEXT: invoke void @_CxxThrowException(38