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