1*cee313d2SEric Christopher; RUN: opt < %s -skip-partial-inlining-cost-analysis -partial-inliner -S | FileCheck %s 2*cee313d2SEric Christopher; RUN: opt < %s -skip-partial-inlining-cost-analysis -passes=partial-inliner -S | FileCheck %s 3*cee313d2SEric Christopher 4*cee313d2SEric Christopherdeclare dso_local void @bar() 5*cee313d2SEric Christopherdeclare dso_local i32 @__CxxFrameHandler3(...) 6*cee313d2SEric Christopher 7*cee313d2SEric Christopherdefine internal void @callee(i1 %cond) personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { 8*cee313d2SEric Christopherentry: 9*cee313d2SEric Christopher br i1 %cond, label %if.then, label %if.end 10*cee313d2SEric Christopher 11*cee313d2SEric Christopherif.then: 12*cee313d2SEric Christopher invoke void @bar() 13*cee313d2SEric Christopher to label %invoke.cont unwind label %ehcleanup 14*cee313d2SEric Christopher 15*cee313d2SEric Christopherinvoke.cont: 16*cee313d2SEric Christopher br label %try.cont 17*cee313d2SEric Christopher 18*cee313d2SEric Christopherehcleanup: 19*cee313d2SEric Christopher %0 = cleanuppad within none [] 20*cee313d2SEric Christopher cleanupret from %0 unwind label %catch.dispatch 21*cee313d2SEric Christopher 22*cee313d2SEric Christophercatch.dispatch: 23*cee313d2SEric Christopher %1 = catchswitch within none [label %catch] unwind to caller 24*cee313d2SEric Christopher 25*cee313d2SEric Christophercatch: 26*cee313d2SEric Christopher %2 = catchpad within %1 [i8* null, i32 64, i8* null] 27*cee313d2SEric Christopher catchret from %2 to label %catchret.dest 28*cee313d2SEric Christopher 29*cee313d2SEric Christophercatchret.dest: 30*cee313d2SEric Christopher br label %try.cont 31*cee313d2SEric Christopher 32*cee313d2SEric Christophertry.cont: 33*cee313d2SEric Christopher br label %if.end 34*cee313d2SEric Christopher 35*cee313d2SEric Christopherif.end: 36*cee313d2SEric Christopher ret void 37*cee313d2SEric Christopher} 38*cee313d2SEric Christopher 39*cee313d2SEric Christopherdefine internal void @caller(i1 %cond) { 40*cee313d2SEric Christopher; CHECK-LABEL: define {{.*}} @caller 41*cee313d2SEric Christopherentry: 42*cee313d2SEric Christopher; CHECK: entry: 43*cee313d2SEric Christopher; CHECK-NEXT: br i1 44*cee313d2SEric Christopher; CHECK: codeRepl.i: 45*cee313d2SEric Christopher; CHECK-NEXT: call void @callee.1.{{.*}}() 46*cee313d2SEric Christopher call void @callee(i1 %cond) 47*cee313d2SEric Christopher ret void 48*cee313d2SEric Christopher} 49*cee313d2SEric Christopher 50*cee313d2SEric Christopher; CHECK-LABEL: define {{.*}} @callee.1.{{.*}}() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) 51*cee313d2SEric Christopher; CHECK: invoke void @bar() 52*cee313d2SEric Christopher; CHECK: cleanuppad 53*cee313d2SEric Christopher; CHECK-NEXT: cleanupret 54*cee313d2SEric Christopher; CHECK: catchswitch 55*cee313d2SEric Christopher; CHECK: catchpad 56*cee313d2SEric Christopher; CHECK-NEXT: catchret 57