1 ; RUN: opt < %s -passes=partial-inliner -S | FileCheck %s
2 ; RUN: opt < %s -passes=partial-inliner -max-num-inline-blocks=3 -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 %bb4
11 %tmp2 = tail call i32 (...) @n() #2
12 %tmp3 = icmp slt i32 %tmp2, %arg
13 br i1 %tmp3, label %bb7, label %bb4
15 bb4: ; preds = %bb1, %bb
16 %tmp5 = tail call i32 (...) @m() #2
17 %tmp6 = icmp slt i32 %tmp5, %arg
18 br i1 %tmp6, label %bb7, label %bb8
20 bb7: ; preds = %bb4, %bb1
21 tail call void (...) @foo() #2
22 tail call void (...) @foo() #2
23 tail call void (...) @foo() #2
24 tail call void (...) @foo() #2
25 tail call void (...) @foo() #2
26 tail call void (...) @foo() #2
27 tail call void (...) @foo() #2
28 tail call void (...) @foo() #2
29 tail call void (...) @foo() #2
32 bb8: ; preds = %bb7, %bb4
33 %tmp9 = phi i32 [ 0, %bb7 ], [ 1, %bb4 ]
37 declare i32 @n(...) local_unnamed_addr #1
39 declare i32 @m(...) local_unnamed_addr #1
41 declare void @foo(...) local_unnamed_addr #1
43 ; Function Attrs: nounwind uwtable
44 define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 {
46 ; CHECK-LABEL: @dummy_caller
50 ; CHECK: call void @bar.1.
51 ; LIMIT-LABEL: @dummy_caller
53 ; LIMIT: call i32 @bar
54 %tmp = tail call i32 @bar(i32 %arg)
58 attributes #0 = { nounwind }
59 attributes #1 = { nounwind }
60 attributes #2 = { nounwind }