1*cee313d2SEric Christopher; RUN: opt < %s -passes=partial-inliner -S | FileCheck %s 2*cee313d2SEric Christopher; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -max-num-inline-blocks=2 -S | FileCheck --check-prefix=LIMIT %s 3*cee313d2SEric Christopher 4*cee313d2SEric Christopher; Function Attrs: nounwind uwtable 5*cee313d2SEric Christopherdefine i32 @bar(i32 %arg) local_unnamed_addr #0 { 6*cee313d2SEric Christopherbb: 7*cee313d2SEric Christopher %tmp = icmp slt i32 %arg, 0 8*cee313d2SEric Christopher br i1 %tmp, label %bb1, label %bb5 9*cee313d2SEric Christopher 10*cee313d2SEric Christopherbb1: ; preds = %bb 11*cee313d2SEric Christopher %tmp2 = tail call i32 (...) @channels() #2 12*cee313d2SEric Christopher %tmp3 = icmp slt i32 %tmp2, %arg 13*cee313d2SEric Christopher br i1 %tmp3, label %bb4, label %bb5 14*cee313d2SEric Christopher 15*cee313d2SEric Christopherbb4: ; preds = %bb1 16*cee313d2SEric Christopher tail call void (...) @foo() #2 17*cee313d2SEric Christopher tail call void (...) @foo() #2 18*cee313d2SEric Christopher tail call void (...) @foo() #2 19*cee313d2SEric Christopher tail call void (...) @foo() #2 20*cee313d2SEric Christopher tail call void (...) @foo() #2 21*cee313d2SEric Christopher tail call void (...) @foo() #2 22*cee313d2SEric Christopher tail call void (...) @foo() #2 23*cee313d2SEric Christopher tail call void (...) @foo() #2 24*cee313d2SEric Christopher tail call void (...) @foo() #2 25*cee313d2SEric Christopher br label %bb5 26*cee313d2SEric Christopher 27*cee313d2SEric Christopherbb5: ; preds = %bb4, %bb1, %bb 28*cee313d2SEric Christopher %tmp6 = phi i32 [ 0, %bb4 ], [ 1, %bb1 ], [ 1, %bb ] 29*cee313d2SEric Christopher ret i32 %tmp6 30*cee313d2SEric Christopher} 31*cee313d2SEric Christopher 32*cee313d2SEric Christopherdeclare i32 @channels(...) local_unnamed_addr #1 33*cee313d2SEric Christopher 34*cee313d2SEric Christopherdeclare void @foo(...) local_unnamed_addr #1 35*cee313d2SEric Christopher 36*cee313d2SEric Christopher; Function Attrs: nounwind uwtable 37*cee313d2SEric Christopherdefine i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 { 38*cee313d2SEric Christopherbb: 39*cee313d2SEric Christopher; CHECK-LABEL: @dummy_caller 40*cee313d2SEric Christopher; CHECK: br i1 41*cee313d2SEric Christopher; CHECK: br i1 42*cee313d2SEric Christopher; CHECK: call void @bar.1. 43*cee313d2SEric Christopher; LIMIT-LABEL: @dummy_caller 44*cee313d2SEric Christopher; LIMIT: br i1 45*cee313d2SEric Christopher; LIMIT-NOT: br 46*cee313d2SEric Christopher; LIMIT: call void @bar.1. 47*cee313d2SEric Christopher %tmp = tail call i32 @bar(i32 %arg) 48*cee313d2SEric Christopher ret i32 %tmp 49*cee313d2SEric Christopher} 50*cee313d2SEric Christopher 51*cee313d2SEric Christopherattributes #0 = { nounwind } 52*cee313d2SEric Christopherattributes #1 = { nounwind } 53*cee313d2SEric Christopherattributes #2 = { nounwind } 54*cee313d2SEric Christopher 55