1 ; RUN: opt < %s -passes=partial-inliner -S | FileCheck %s
2 ; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -max-num-inline-blocks=2 -S | FileCheck --check-prefix=LIMIT %s
4 ; Function Attrs: nounwind uwtable
5 define i32 @bar(i32 %arg) local_unnamed_addr #0 {
7 %tmp = icmp slt i32 %arg, 0
8 br i1 %tmp, label %bb1, label %bb5
11 %tmp2 = tail call i32 (...) @channels() #2
12 %tmp3 = icmp slt i32 %tmp2, %arg
13 br i1 %tmp3, label %bb4, label %bb5
16 tail call void (...) @foo() #2
17 tail call void (...) @foo() #2
18 tail call void (...) @foo() #2
19 tail call void (...) @foo() #2
20 tail call void (...) @foo() #2
21 tail call void (...) @foo() #2
22 tail call void (...) @foo() #2
23 tail call void (...) @foo() #2
24 tail call void (...) @foo() #2
27 bb5: ; preds = %bb4, %bb1, %bb
28 %tmp6 = phi i32 [ 0, %bb4 ], [ 1, %bb1 ], [ 1, %bb ]
32 declare i32 @channels(...) local_unnamed_addr #1
34 declare void @foo(...) local_unnamed_addr #1
36 ; Function Attrs: nounwind uwtable
37 define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 {
39 ; CHECK-LABEL: @dummy_caller
42 ; CHECK: call void @bar.1.
43 ; LIMIT-LABEL: @dummy_caller
46 ; LIMIT: call void @bar.1.
47 %tmp = tail call i32 @bar(i32 %arg)
51 attributes #0 = { nounwind }
52 attributes #1 = { nounwind }
53 attributes #2 = { nounwind }