llvm.org GIT mirror llvm / e41f384
[opaque pointer type] Add textual IR support for explicit type parameter to the invoke instruction Same as r235145 for the call instruction - the justification, tradeoffs, etc are all the same. The conversion script worked the same without any false negatives (after replacing 'call' with 'invoke'). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235755 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 4 years ago
17 changed file(s) with 69 addition(s) and 78 deletion(s). Raw diff Collapse all Expand all
47404740 // If RetType is a non-function pointer type, then this is the short syntax
47414741 // for the call, which means that RetType is just the return type. Infer the
47424742 // rest of the function argument types from the arguments that are present.
4743 PointerType *PFTy = nullptr;
4744 FunctionType *Ty = nullptr;
4745 if (!(PFTy = dyn_cast(RetType)) ||
4746 !(Ty = dyn_cast(PFTy->getElementType()))) {
4743 FunctionType *Ty = dyn_cast(RetType);
4744 if (!Ty) {
47474745 // Pull out the types of all of the arguments...
47484746 std::vector ParamTypes;
47494747 for (unsigned i = 0, e = ArgList.size(); i != e; ++i)
47534751 return Error(RetTypeLoc, "Invalid result type for LLVM function");
47544752
47554753 Ty = FunctionType::get(RetType, ParamTypes, false);
4756 PFTy = PointerType::getUnqual(Ty);
47574754 }
47584755
47594756 // Look up the callee.
47604757 Value *Callee;
4761 if (ConvertValIDToValue(PFTy, CalleeID, Callee, &PFS)) return true;
4758 if (ConvertValIDToValue(PointerType::getUnqual(Ty), CalleeID, Callee, &PFS))
4759 return true;
47624760
47634761 // Set up the Attribute for the function.
47644762 SmallVector Attrs;
28142814 Out << " #" << Machine.getAttributeGroupSlot(PAL.getFnAttributes());
28152815 } else if (const InvokeInst *II = dyn_cast(&I)) {
28162816 Operand = II->getCalledValue();
2817 PointerType *PTy = cast(Operand->getType());
2818 FunctionType *FTy = cast(PTy->getElementType());
2817 FunctionType *FTy = cast(II->getFunctionType());
28192818 Type *RetTy = FTy->getReturnType();
28202819 const AttributeSet &PAL = II->getAttributes();
28212820
28332832 // and if the return type is not a pointer to a function.
28342833 //
28352834 Out << ' ';
2836 if (!FTy->isVarArg() &&
2837 (!RetTy->isPointerTy() ||
2838 !cast(RetTy)->getElementType()->isFunctionTy())) {
2839 TypePrinter.print(RetTy, Out);
2840 Out << ' ';
2841 writeOperand(Operand, false);
2842 } else {
2843 writeOperand(Operand, true);
2844 }
2835 TypePrinter.print(FTy->isVarArg() ? FTy : RetTy, Out);
2836 Out << ' ';
2837 writeOperand(Operand, false);
28452838 Out << '(';
28462839 for (unsigned op = 0, Eop = II->getNumArgOperands(); op < Eop; ++op) {
28472840 if (op)
4444 %exn.scalar = load i32, i32* %6
4545 store i32 %exn.scalar, i32* %e, align 4
4646 %7 = load i32, i32* %e, align 4
47 %call2 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str1, i32 0, i32 0), i32 %7)
47 %call2 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str1, i32 0, i32 0), i32 %7)
4848 to label %invoke.cont unwind label %lpad1
4949
5050 invoke.cont: ; preds = %catch
6060 %.i8 = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?f@@YAXXZ" to i8*), i8* %1, i32 1)
6161 %2 = bitcast i8* %.i8 to double*
6262 %3 = bitcast double* %2 to i8*
63 invoke void (...)* @llvm.donothing()
63 invoke void (...) @llvm.donothing()
6464 to label %done unwind label %lpad
6565
6666 done:
131131 call void @llvm.eh.begincatch(i8* %exn, i8* %c) #2
132132 %4 = load i8, i8* %c, align 1
133133 %conv = sext i8 %4 to i32
134 %call = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv)
134 %call = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv)
135135 to label %invoke.cont unwind label %lpad2
136136
137137 invoke.cont: ; preds = %catch
176176 %13 = bitcast i32* %x to i8*
177177 call void @llvm.eh.begincatch(i8* %exn14, i8* %13) #2
178178 %14 = load i32, i32* %x, align 4
179 %call18 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %14)
179 %call18 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %14)
180180 to label %invoke.cont17 unwind label %lpad16
181181
182182 invoke.cont17: ; preds = %catch13
191191 catch8: ; preds = %catch.dispatch5
192192 %exn9 = load i8*, i8** %exn.slot
193193 call void @llvm.eh.begincatch(i8* %exn9, i8* null) #2
194 %call12 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
194 %call12 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
195195 to label %invoke.cont11 unwind label %lpad10
196196
197197 invoke.cont11: ; preds = %catch8
240240 call void @llvm.eh.begincatch(i8* %exn26, i8* %c28) #2
241241 %25 = load i8, i8* %c28, align 1
242242 %conv29 = sext i8 %25 to i32
243 %call32 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv29)
243 %call32 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv29)
244244 to label %invoke.cont31 unwind label %lpad30
245245
246246 invoke.cont31: ; preds = %catch25
287287 %34 = bitcast i32* %x56 to i8*
288288 call void @llvm.eh.begincatch(i8* %exn54, i8* %34) #2
289289 %35 = load i32, i32* %x56, align 4
290 %call59 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %35)
290 %call59 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %35)
291291 to label %invoke.cont58 unwind label %lpad57
292292
293293 invoke.cont58: ; preds = %catch53
307307 call void @llvm.eh.begincatch(i8* %exn46, i8* %c48) #2
308308 %37 = load i8, i8* %c48, align 1
309309 %conv49 = sext i8 %37 to i32
310 %call52 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv49)
310 %call52 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv49)
311311 to label %invoke.cont51 unwind label %lpad50
312312
313313 invoke.cont51: ; preds = %catch45
317317 catch40: ; preds = %catch.fallthrough
318318 %exn41 = load i8*, i8** %exn.slot
319319 call void @llvm.eh.begincatch(i8* %exn41, i8* null) #2
320 %call44 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
320 %call44 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
321321 to label %invoke.cont43 unwind label %lpad42
322322
323323 invoke.cont43: ; preds = %catch40
116116 invcont5814: ; preds = %bb448.i8694, %bb265.i8606
117117 %tmp812.0.0 = phi i16 [ %tmp477478.i8670, %bb448.i8694 ], [ %tmp273274.i8595, %bb265.i8606 ] ; [#uses=1]
118118 %tmp58165817 = zext i16 %tmp812.0.0 to i32 ; [#uses=1]
119 invoke void (%struct.wxString*, i32*, ...)* @_ZN8wxString6FormatEPKwz( %struct.wxString* noalias sret null, i32* null, i32 %tmp58165817 )
119 invoke void (%struct.wxString*, i32*, ...) @_ZN8wxString6FormatEPKwz( %struct.wxString* noalias sret null, i32* null, i32 %tmp58165817 )
120120 to label %invcont5831 unwind label %lpad
121121 invcont5831: ; preds = %invcont5814
122122 %tmp5862 = invoke zeroext i8 @_ZN12wxStringBase10ConcatSelfEmPKwm( %struct.wxStringBase* null, i32 0, i32* null, i32 0 )
123123 to label %bb7834 unwind label %lpad8185 ; [#uses=0]
124124 bb5968: ; preds = %bb3314
125 invoke void (%struct.wxString*, i32*, ...)* @_ZN8wxString6FormatEPKwz( %struct.wxString* noalias sret null, i32* null, i32 0 )
125 invoke void (%struct.wxString*, i32*, ...) @_ZN8wxString6FormatEPKwz( %struct.wxString* noalias sret null, i32* null, i32 0 )
126126 to label %invcont5981 unwind label %lpad
127127 invcont5981: ; preds = %bb5968
128128 ret void
4848 %5 = bitcast i8* %4 to i32* ; [#uses=1]
4949 %6 = load i32, i32* %5 ; [#uses=1]
5050 store i32 %6, i32* %0
51 %call = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), %struct.S* %s2)
51 %call = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), %struct.S* %s2)
5252 to label %invoke.cont2 unwind label %match.handler ; [#uses=0]
5353
5454 invoke.cont2: ; preds = %match
2548625486 br i1 undef, label %bb25333, label %bb25357
2548725487
2548825488 bb25333: ; preds = %bb25332
25489 invoke void (...)* @printf()
25489 invoke void (...) @printf()
2549025490 to label %bb25334 unwind label %bb25324
2549125491
2549225492 bb25334: ; preds = %bb25333
25493 invoke void (...)* @printf(i32 undef)
25493 invoke void (...) @printf(i32 undef)
2549425494 to label %bb25335 unwind label %bb25324
2549525495
2549625496 bb25335: ; preds = %bb25334
2550025500 br i1 undef, label %bb25337, label %bb25339
2550125501
2550225502 bb25337: ; preds = %bb25336
25503 invoke void (...)* @printf(i32 undef, double undef)
25503 invoke void (...) @printf(i32 undef, double undef)
2550425504 to label %bb25338 unwind label %bb25324
2550525505
2550625506 bb25338: ; preds = %bb25337
2551625516 br label %bb25340
2551725517
2551825518 bb25342: ; preds = %bb25340
25519 invoke void (...)* @printf()
25519 invoke void (...) @printf()
2552025520 to label %bb25343 unwind label %bb25324
2552125521
2552225522 bb25343: ; preds = %bb25342
25523 invoke void (...)* @printf(double undef, double undef)
25523 invoke void (...) @printf(double undef, double undef)
2552425524 to label %bb25344 unwind label %bb25324
2552525525
2552625526 bb25344: ; preds = %bb25343
2554625546 br label %bb25349
2554725547
2554825548 bb25351: ; preds = %bb25349
25549 invoke void (...)* @printf()
25549 invoke void (...) @printf()
2555025550 to label %bb25352 unwind label %bb25355
2555125551
2555225552 bb25352: ; preds = %bb25351
25553 invoke void (...)* @printf(double undef)
25553 invoke void (...) @printf(double undef)
2555425554 to label %bb25353 unwind label %bb25355
2555525555
2555625556 bb25353: ; preds = %bb25352
25557 invoke void (...)* @printf()
25557 invoke void (...) @printf()
2555825558 to label %bb25354 unwind label %bb25355
2555925559
2556025560 bb25354: ; preds = %bb25353
2556625566 br label %bb25359
2556725567
2556825568 bb25357: ; preds = %bb25332
25569 invoke void (...)* @printf()
25569 invoke void (...) @printf()
2557025570 to label %bb25358 unwind label %bb25324
2557125571
2557225572 bb25358: ; preds = %bb25357, %bb25354
1717 ; CHECK-NEXT: [[PP_END:.L.*]]:
1818 ; CHECK: ret
1919 %resolveCall = inttoptr i64 -559038736 to i8*
20 %result = invoke i64 (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.i64(i64 2, i32 15, i8* %resolveCall, i32 1, i64 %p1, i64 %p2)
20 %result = invoke i64 (i64, i32, i8*, i32, ...) @llvm.experimental.patchpoint.i64(i64 2, i32 15, i8* %resolveCall, i32 1, i64 %p1, i64 %p2)
2121 to label %success unwind label %threw
2222
2323 success:
1515 to label %invcont unwind label %lpad ; <%struct.NSObject*> [#uses=1]
1616
1717 invcont: ; preds = %entry
18 %1 = invoke %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...)* @objc_msgSend(%struct.NSObject* %0, %struct.objc_selector* null)
18 %1 = invoke %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...) @objc_msgSend(%struct.NSObject* %0, %struct.objc_selector* null)
1919 to label %invcont26 unwind label %lpad ; <%struct.NSObject*> [#uses=0]
2020
2121 invcont26: ; preds = %invcont
1212 ; CHECK: .Ltmp{{[0-9]+}}:
1313 ; CHECK: callq some_other_call
1414 ; CHECK: .Ltmp{{[0-9]+}}:
15 %0 = invoke i32 (i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 addrspace(1)* (i64 addrspace(1)*)* @some_other_call, i32 1, i32 0, i64 addrspace(1)* %obj, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0, i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1)
15 %0 = invoke i32 (i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 addrspace(1)* (i64 addrspace(1)*)* @some_other_call, i32 1, i32 0, i64 addrspace(1)* %obj, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0, i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1)
1616 to label %normal_return unwind label %exceptional_return
1717
1818 normal_return:
103103 entry:
104104 %0 = bitcast i32* %b to i8*
105105 %1 = bitcast i32* %a to i64*
106 invoke void (i32, ...)* @varargs(i32 1, i8* %0, i64* %1)
106 invoke void (i32, ...) @varargs(i32 1, i8* %0, i64* %1)
107107 to label %invoke.cont unwind label %lpad
108108
109109 invoke.cont: ; preds = %entry
115115 ret void
116116 ; CHECK-LABEL: test_invoke_vararg_cast
117117 ; CHECK-LABEL: entry:
118 ; CHECK: invoke void (i32, ...)* @varargs(i32 1, i32* %b, i32* %a)
118 ; CHECK: invoke void (i32, ...) @varargs(i32 1, i32* %b, i32* %a)
119119 }
120120
121121 define i8* @test13(i64 %A) {
5353 br i1 undef, label %bb12, label %bb18
5454
5555 bb12: ; preds = %invcont11
56 invoke void (i8*, i8*, ...)* @_ZN6cEnvir6printfEPKcz(i8* null, i8* getelementptr ([3 x i8], [3 x i8]* @.str12, i32 0, i32 0), i32 undef)
56 invoke void (i8*, i8*, ...) @_ZN6cEnvir6printfEPKcz(i8* null, i8* getelementptr ([3 x i8], [3 x i8]* @.str12, i32 0, i32 0), i32 undef)
5757 to label %bb.i.i159 unwind label %lpad119
5858
5959 bb.i.i159: ; preds = %bb12
7676 br i1 undef, label %bb49, label %bb61
7777
7878 bb49: ; preds = %invcont35
79 invoke void (i8*, i8*, ...)* @_ZNK13cSimpleModule5errorEPKcz(i8* undef, i8* getelementptr ([92 x i8], [92 x i8]* @.str32190, i32 0, i32 0))
79 invoke void (i8*, i8*, ...) @_ZNK13cSimpleModule5errorEPKcz(i8* undef, i8* getelementptr ([92 x i8], [92 x i8]* @.str32190, i32 0, i32 0))
8080 to label %bb51 unwind label %lpad119
8181
8282 bb51: ; preds = %bb49
880880 to label %land.end unwind label %lpad3
881881
882882 land.end: ; preds = %land.rhs, %invoke.cont4
883 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
883 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
884884 to label %invoke.cont.i unwind label %lpad.i
885885
886886 invoke.cont.i: ; preds = %land.end
895895 unreachable
896896
897897 invoke.cont8: ; preds = %if.then.i, %invoke.cont.i
898 %call18 = invoke i8* (i8*, i8*, i8*, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*, ...)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
898 %call18 = invoke i8* (i8*, i8*, i8*, ...) bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*, ...)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
899899 to label %invoke.cont17 unwind label %lpad16
900900
901901 invoke.cont17: ; preds = %invoke.cont8
903903 to label %invoke.cont21 unwind label %lpad20
904904
905905 invoke.cont21: ; preds = %invoke.cont17
906 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
906 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
907907 to label %invoke.cont.i1980 unwind label %lpad.i1982
908908
909909 invoke.cont.i1980: ; preds = %invoke.cont21
929929 to label %land.end43 unwind label %lpad35
930930
931931 land.end43: ; preds = %land.rhs39, %invoke.cont36
932 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
932 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
933933 to label %invoke.cont.i1986 unwind label %lpad.i1988
934934
935935 invoke.cont.i1986: ; preds = %land.end43
959959 to label %land.end70 unwind label %lpad66.body.thread
960960
961961 land.end70: ; preds = %invoke.cont62, %invoke.cont52
962 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
962 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
963963 to label %invoke.cont.i1992 unwind label %lpad66.body
964964
965965 invoke.cont.i1992: ; preds = %land.end70
969969 br label %invoke.cont71
970970
971971 invoke.cont71: ; preds = %if.then.i1993, %invoke.cont.i1992
972 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
972 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
973973 to label %invoke.cont.i1998 unwind label %lpad.i2000
974974
975975 invoke.cont.i1998: ; preds = %invoke.cont71
992992 to label %invoke.cont97 unwind label %lpad94
993993
994994 invoke.cont97: ; preds = %invoke.cont95
995 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
995 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
996996 to label %invoke.cont.i2004 unwind label %lpad.i2006
997997
998998 invoke.cont.i2004: ; preds = %invoke.cont97
10111011 to label %invoke.cont110 unwind label %lpad109
10121012
10131013 invoke.cont110: ; preds = %invoke.cont100
1014 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1014 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
10151015 to label %invoke.cont.i2010 unwind label %lpad.i2012
10161016
10171017 invoke.cont.i2010: ; preds = %invoke.cont110
10261026 unreachable
10271027
10281028 invoke.cont117: ; preds = %if.then.i2011, %invoke.cont.i2010
1029 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1029 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
10301030 to label %invoke.cont.i2022 unwind label %lpad156.body
10311031
10321032 lpad: ; preds = %entry
11001100 br label %invoke.cont157
11011101
11021102 invoke.cont157: ; preds = %if.then.i2023, %invoke.cont.i2022
1103 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1103 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
11041104 to label %invoke.cont.i2028 unwind label %lpad164.body
11051105
11061106 invoke.cont.i2028: ; preds = %invoke.cont157
11181118 to label %invoke.cont185 unwind label %lpad183
11191119
11201120 invoke.cont185: ; preds = %invoke.cont184
1121 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1121 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
11221122 to label %invoke.cont.i2034 unwind label %lpad.i2036
11231123
11241124 invoke.cont.i2034: ; preds = %invoke.cont185
11451145 to label %invoke.cont204 unwind label %lpad203
11461146
11471147 invoke.cont204: ; preds = %invoke.cont201
1148 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1148 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
11491149 to label %invoke.cont.i2040 unwind label %lpad.i2042
11501150
11511151 invoke.cont.i2040: ; preds = %invoke.cont204
11641164 to label %invoke.cont208 unwind label %lpad203
11651165
11661166 invoke.cont208: ; preds = %invoke.cont207
1167 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1167 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
11681168 to label %invoke.cont.i2046 unwind label %lpad212.body
11691169
11701170 invoke.cont.i2046: ; preds = %invoke.cont208
11821182 to label %invoke.cont228 unwind label %lpad227
11831183
11841184 invoke.cont228: ; preds = %invoke.cont221
1185 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1185 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
11861186 to label %invoke.cont.i2052 unwind label %lpad.i2054
11871187
11881188 invoke.cont.i2052: ; preds = %invoke.cont228
12011201 to label %invoke.cont232 unwind label %lpad227
12021202
12031203 invoke.cont232: ; preds = %invoke.cont231
1204 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1204 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
12051205 to label %invoke.cont.i2058 unwind label %lpad236.body
12061206
12071207 invoke.cont.i2058: ; preds = %invoke.cont232
12471247 to label %invoke.cont278 unwind label %lpad277
12481248
12491249 invoke.cont278: ; preds = %invoke.cont274
1250 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1250 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
12511251 to label %invoke.cont.i2064 unwind label %lpad.i2066
12521252
12531253 invoke.cont.i2064: ; preds = %invoke.cont278
12931293 to label %land.end344 unwind label %lpad340.body.thread
12941294
12951295 land.end344: ; preds = %land.rhs335, %invoke.cont321
1296 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1296 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
12971297 to label %invoke.cont.i2070 unwind label %lpad340.body
12981298
12991299 invoke.cont.i2070: ; preds = %land.end344
13151315 to label %invoke.cont370 unwind label %lpad369
13161316
13171317 invoke.cont370: ; preds = %invoke.cont364
1318 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1318 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
13191319 to label %invoke.cont.i2076 unwind label %lpad.i2078
13201320
13211321 invoke.cont.i2076: ; preds = %invoke.cont370
13421342 to label %invoke.cont383 unwind label %lpad381
13431343
13441344 invoke.cont383: ; preds = %invoke.cont382
1345 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1345 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
13461346 to label %invoke.cont.i2082 unwind label %lpad.i2084
13471347
13481348 invoke.cont.i2082: ; preds = %invoke.cont383
13731373 to label %invoke.cont402 unwind label %lpad401
13741374
13751375 invoke.cont402: ; preds = %invoke.cont399
1376 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1376 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
13771377 to label %invoke.cont.i2088 unwind label %lpad.i2090
13781378
13791379 invoke.cont.i2088: ; preds = %invoke.cont402
14001400 to label %invoke.cont412 unwind label %lpad411
14011401
14021402 invoke.cont412: ; preds = %invoke.cont409
1403 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1403 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
14041404 to label %invoke.cont.i2094 unwind label %lpad.i2096
14051405
14061406 invoke.cont.i2094: ; preds = %invoke.cont412
14311431 to label %invoke.cont429 unwind label %lpad428
14321432
14331433 invoke.cont429: ; preds = %invoke.cont426
1434 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1434 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
14351435 to label %invoke.cont.i2100 unwind label %lpad.i2102
14361436
14371437 invoke.cont.i2100: ; preds = %invoke.cont429
14501450 to label %invoke.cont435 unwind label %lpad381
14511451
14521452 invoke.cont435: ; preds = %invoke.cont432
1453 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1453 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
14541454 to label %invoke.cont.i2106 unwind label %lpad.i2108
14551455
14561456 invoke.cont.i2106: ; preds = %invoke.cont435
14631463 unreachable
14641464
14651465 invoke.cont443: ; preds = %invoke.cont.i2106
1466 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1466 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
14671467 to label %invoke.cont.i2112 unwind label %lpad.i2114
14681468
14691469 invoke.cont.i2112: ; preds = %invoke.cont443
14861486 to label %invoke.cont455 unwind label %lpad454
14871487
14881488 invoke.cont455: ; preds = %invoke.cont452
1489 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1489 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
14901490 to label %invoke.cont.i2118 unwind label %lpad.i2120
14911491
14921492 invoke.cont.i2118: ; preds = %invoke.cont455
15051505 to label %invoke.cont460 unwind label %lpad381
15061506
15071507 invoke.cont460: ; preds = %invoke.cont458
1508 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1508 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
15091509 to label %invoke.cont.i2124 unwind label %lpad.i2126
15101510
15111511 invoke.cont.i2124: ; preds = %invoke.cont460
15241524 to label %invoke.cont469 unwind label %lpad381
15251525
15261526 invoke.cont469: ; preds = %invoke.cont466
1527 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1527 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
15281528 to label %invoke.cont.i2130 unwind label %lpad.i2132
15291529
15301530 invoke.cont.i2130: ; preds = %invoke.cont469
15731573 br label %msgSend.cont
15741574
15751575 msgSend.cont: ; preds = %msgSend.null-receiver, %msgSend.call
1576 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1576 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
15771577 to label %invoke.cont.i2136 unwind label %lpad.i2138
15781578
15791579 invoke.cont.i2136: ; preds = %msgSend.cont
16001600 to label %invoke.cont534 unwind label %lpad533
16011601
16021602 invoke.cont534: ; preds = %invoke.cont531
1603 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1603 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
16041604 to label %invoke.cont.i2142 unwind label %lpad.i2144
16051605
16061606 invoke.cont.i2142: ; preds = %invoke.cont534
16321632
16331633 invoke.cont554: ; preds = %invoke.cont548
16341634 %tmp499 = call i8* @objc_retain(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*)) #3
1635 invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* %tmp499, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
1635 invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* %tmp499, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
16361636 to label %invoke.cont.i2148 unwind label %lpad.i2150
16371637
16381638 invoke.cont.i2148: ; preds = %invoke.cont554
5757 ; CHECK-NEXT: gc.statepoint
5858 entry:
5959 %obj = load <2 x i64 addrspace(1)*>, <2 x i64 addrspace(1)*>* %ptr
60 invoke i32 (void ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* @do_safepoint, i32 0, i32 0, i32 0)
60 invoke i32 (void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* @do_safepoint, i32 0, i32 0, i32 0)
6161 to label %normal_return unwind label %exceptional_return
6262
6363 ; CHECK-LABEL: normal_return:
4444 ret void
4545
4646 unreached:
47 invoke i32 (void ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* @foo, i32 0, i32 0, i32 0)
47 invoke i32 (void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* @foo, i32 0, i32 0, i32 0)
4848 to label %normal_return unwind label %exceptional_return
4949
5050 normal_return: ; preds = %entry
5656 entry:
5757 ; CHECK-LABEL: entry
5858 ; CHECK: statepoint
59 %0 = invoke i32 (void ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* undef, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0, i8 addrspace(1)* %obj, i8 addrspace(1)* %obj1)
59 %0 = invoke i32 (void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* undef, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0, i8 addrspace(1)* %obj, i8 addrspace(1)* %obj1)
6060 to label %normal_dest unwind label %exceptional_return
6161
6262 normal_dest: