1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
4 %struct.FetchPlanHeader = type { i8*, i8*, i32, i8*, i8*, i8*, i8*, i8*, %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...)*, %struct.__attributeDescriptionFlags }
5 %struct.NSArray = type { %struct.NSObject }
6 %struct.NSAutoreleasePool = type { %struct.NSObject, i8*, i8*, i8*, i8* }
7 %struct.NSObject = type { %struct.NSObject* }
8 %struct.__attributeDescriptionFlags = type <{ i32 }>
9 %struct._message_ref_t = type { %struct.NSObject* (%struct.NSObject*, %struct._message_ref_t*, ...)*, %struct.objc_selector* }
10 %struct.objc_selector = type opaque
11 @"\01l_objc_msgSend_fixup_alloc" = external global %struct._message_ref_t, align 16 ; <%struct._message_ref_t*> [#uses=2]
13 define %struct.NSArray* @newFetchedRowsForFetchPlan_MT(%struct.FetchPlanHeader* %fetchPlan, %struct.objc_selector* %selectionMethod, %struct.NSObject* %selectionParameter) ssp personality i32 (...)* @__gxx_personality_v0 {
14 ; CHECK-LABEL: newFetchedRowsForFetchPlan_MT:
15 ; CHECK: ## %bb.0: ## %entry
16 ; CHECK-NEXT: pushq %rax
17 ; CHECK-NEXT: .cfi_def_cfa_offset 16
19 ; CHECK-NEXT: movq l_objc_msgSend_fixup_alloc@{{.*}}(%rip), %rsi
20 ; CHECK-NEXT: xorl %eax, %eax
21 ; CHECK-NEXT: xorl %edi, %edi
22 ; CHECK-NEXT: callq *%rax
24 ; CHECK-NEXT: ## %bb.1: ## %invcont
26 ; CHECK-NEXT: movq %rax, %rdi
27 ; CHECK-NEXT: xorl %esi, %esi
28 ; CHECK-NEXT: xorl %eax, %eax
29 ; CHECK-NEXT: callq _objc_msgSend
31 ; CHECK-NEXT: ## %bb.2: ## %invcont26
33 ; CHECK-NEXT: movq l_objc_msgSend_fixup_alloc@{{.*}}(%rip), %rsi
34 ; CHECK-NEXT: xorl %eax, %eax
35 ; CHECK-NEXT: xorl %edi, %edi
36 ; CHECK-NEXT: callq *%rax
38 ; CHECK-NEXT: ## %bb.3: ## %invcont27
40 ; CHECK-NEXT: LBB0_4: ## %lpad
43 ; CHECK-NEXT: Lfunc_end0:
45 %0 = invoke %struct.NSObject* null(%struct.NSObject* null, %struct._message_ref_t* @"\01l_objc_msgSend_fixup_alloc")
46 to label %invcont unwind label %lpad ; <%struct.NSObject*> [#uses=1]
48 invcont: ; preds = %entry
49 %1 = invoke %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...) @objc_msgSend(%struct.NSObject* %0, %struct.objc_selector* null)
50 to label %invcont26 unwind label %lpad ; <%struct.NSObject*> [#uses=0]
52 invcont26: ; preds = %invcont
53 %2 = invoke %struct.NSObject* null(%struct.NSObject* null, %struct._message_ref_t* @"\01l_objc_msgSend_fixup_alloc")
54 to label %invcont27 unwind label %lpad ; <%struct.NSObject*> [#uses=0]
56 invcont27: ; preds = %invcont26
59 lpad: ; preds = %invcont26, %invcont, %entry
60 %pool.1 = phi %struct.NSAutoreleasePool* [ null, %entry ], [ null, %invcont ], [ null, %invcont26 ] ; <%struct.NSAutoreleasePool*> [#uses=0]
61 %exn = landingpad {i8*, i32}
66 declare %struct.NSObject* @objc_msgSend(%struct.NSObject*, %struct.objc_selector*, ...)
68 declare i32 @__gxx_personality_v0(...)