1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
4 %struct.FetchPlanHeader = type { ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.__attributeDescriptionFlags }
5 %struct.NSArray = type { %struct.NSObject }
6 %struct.NSAutoreleasePool = type { %struct.NSObject, ptr, ptr, ptr, ptr }
7 %struct.NSObject = type { ptr }
8 %struct.__attributeDescriptionFlags = type <{ i32 }>
9 %struct._message_ref_t = type { ptr, ptr }
10 %struct.objc_selector = type opaque
11 @"\01l_objc_msgSend_fixup_alloc" = external global %struct._message_ref_t, align 16 ; <ptr> [#uses=2]
13 define ptr @newFetchedRowsForFetchPlan_MT(ptr %fetchPlan, ptr %selectionMethod, ptr %selectionParameter) ssp personality ptr @__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 ptr null(ptr null, ptr @"\01l_objc_msgSend_fixup_alloc")
46 to label %invcont unwind label %lpad ; <ptr> [#uses=1]
48 invcont: ; preds = %entry
49 %1 = invoke ptr (ptr, ptr, ...) @objc_msgSend(ptr %0, ptr null)
50 to label %invcont26 unwind label %lpad ; <ptr> [#uses=0]
52 invcont26: ; preds = %invcont
53 %2 = invoke ptr null(ptr null, ptr @"\01l_objc_msgSend_fixup_alloc")
54 to label %invcont27 unwind label %lpad ; <ptr> [#uses=0]
56 invcont27: ; preds = %invcont26
59 lpad: ; preds = %invcont26, %invcont, %entry
60 %pool.1 = phi ptr [ null, %entry ], [ null, %invcont ], [ null, %invcont26 ] ; <ptr> [#uses=0]
61 %exn = landingpad {ptr, i32}
66 declare ptr @objc_msgSend(ptr, ptr, ...)
68 declare i32 @__gxx_personality_v0(...)