1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=reg2mem -S < %s | FileCheck %s
4 declare void @"read_mem"()
6 define void @"memcpy_seh"() personality ptr @__C_specific_handler {
7 ; CHECK-LABEL: @memcpy_seh(
9 ; CHECK-NEXT: %"reg2mem alloca point" = bitcast i32 0 to i32
10 ; CHECK-NEXT: invoke void @read_mem()
11 ; CHECK-NEXT: to label [[CLEANUP:%.*]] unwind label [[CATCH_DISPATCH:%.*]]
12 ; CHECK: catch.dispatch:
13 ; CHECK-NEXT: [[TMP0:%.*]] = catchswitch within none [label %__except] unwind to caller
15 ; CHECK-NEXT: [[TMP1:%.*]] = catchpad within [[TMP0]] [ptr null]
16 ; CHECK-NEXT: unreachable
18 ; CHECK-NEXT: ret void
21 invoke void @"read_mem"()
22 to label %cleanup unwind label %catch.dispatch
24 catch.dispatch: ; preds = %entry
25 %0 = catchswitch within none [label %__except] unwind to caller
27 __except: ; preds = %catch.dispatch
28 %1 = catchpad within %0 [ptr null]
31 cleanup: ; preds = %entry
35 declare i32 @__C_specific_handler(...)