1 ; RUN: opt -mtriple=i686-unknown-windows-msvc -objc-arc-contract -S -o - %s | FileCheck %s
3 ; Generated (and lightly modified and cleaned up) from the following source:
13 define void @"\01?g@@YAXXZ"() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
15 %call = invoke i8* @"\01?f@@YAPAUobjc_object@@XZ"()
16 to label %invoke.cont unwind label %catch.dispatch
18 catch.dispatch: ; preds = %entry
19 %0 = catchswitch within none [label %catch] unwind to caller
21 catch: ; preds = %catch.dispatch
22 %1 = catchpad within %0 [i8* null, i32 64, i8* null]
23 %call1 = call i8* @"\01?f@@YAPAUobjc_object@@XZ"() [ "funclet"(token %1) ]
24 %2 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1) [ "funclet"(token %1) ]
25 call void @llvm.objc.release(i8* %2) [ "funclet"(token %1) ]
28 catch.1: ; preds = %catch
29 %call2 = call i8* @"\01?f@@YAPAUobjc_object@@XZ"() [ "funclet"(token %1) ]
30 %3 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call2) [ "funclet"(token %1) ]
31 call void @llvm.objc.release(i8* %3) [ "funclet"(token %1) ]
32 catchret from %1 to label %catchret.dest
34 catchret.dest: ; preds = %catch.1
37 invoke.cont: ; preds = %entry
38 %4 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call)
39 call void @llvm.objc.release(i8* %4)
43 declare i8* @"\01?f@@YAPAUobjc_object@@XZ"()
45 declare i32 @__CxxFrameHandler3(...)
47 declare dllimport i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
49 declare dllimport void @llvm.objc.release(i8*)
51 !llvm.module.flags = !{!0}
53 !0 = !{i32 1, !"clang.arc.retainAutoreleasedReturnValueMarker", !"movl\09%ebp, %ebp\09\09// marker for objc_retainAutoreleaseReturnValue"}
56 ; CHECK: call void asm sideeffect "movl{{.*}}%ebp, %ebp{{.*}}", ""() [ "funclet"(token %1) ]
58 ; CHECK-LABEL: catch.1
59 ; CHECK: call void asm sideeffect "movl{{.*}}%ebp, %ebp{{.*}}", ""() [ "funclet"(token %1) ]
61 ; CHECK-LABEL: invoke.cont
62 ; CHECK: call void asm sideeffect "movl{{.*}}%ebp, %ebp{{.*}}", ""(){{$}}