1 ; RUN: opt < %s -partial-inliner -S | FileCheck %s
3 ; Function Attrs: nounwind uwtable
4 define dso_local i8* @bar(i32 %arg) local_unnamed_addr #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
6 %tmp = icmp slt i32 %arg, 0
7 br i1 %tmp, label %bb1, label %bb5
10 %call26 = invoke i8* @invoke_callee() #2
11 to label %cont unwind label %lpad
12 lpad: ; preds = %if.end
13 %0 = landingpad { i8*, i32 }
15 resume { i8*, i32 } undef
20 bb5: ; preds = %bb4, %bb1, %bb
21 %retval = phi i8* [ %call26, %cont ], [ undef, %bb]
25 ; CHECK-LABEL: @dummy_caller
27 ; CHECK-NEXT: [[CALL26LOC:%.*]] = alloca i8*
28 ; CHECK-LABEL: codeRepl.i:
29 ; CHECK-NEXT: %lt.cast.i = bitcast i8** [[CALL26LOC]] to i8*
30 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast.i)
31 ; CHECK-NEXT: call void @bar.1.bb1(i8** [[CALL26LOC]])
32 ; CHECK-NEXT: %call26.reload.i = load i8*, i8** [[CALL26LOC]]
33 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 -1, i8* %lt.cast.i)
34 define i8* @dummy_caller(i32 %arg) {
36 %tmp = tail call i8* @bar(i32 %arg)
40 ; CHECK-LABEL: define internal void @bar.1.bb1
42 ; CHECK-NEXT: %call26 = invoke i8* @invoke_callee()
43 ; CHECK-NEXT: to label %cont unwind label %lpad
45 ; CHECK-NEXT: store i8* %call26, i8** %call26.out
46 ; CHECK-NEXT: br label %bb5.exitStub
48 ; Function Attrs: nobuiltin
49 declare dso_local noalias nonnull i8* @invoke_callee() local_unnamed_addr #1
51 declare dso_local i32 @__gxx_personality_v0(...)