1 ; RUN: opt < %s -partial-inliner -S | FileCheck %s
2 ; RUN: opt < %s -passes=partial-inliner -S | FileCheck %s
3 ; RUN: opt < %s -partial-inliner -max-num-inline-blocks=3 -S | FileCheck --check-prefix=LIMIT %s
4 ; RUN: opt < %s -passes=partial-inliner -max-num-inline-blocks=3 -S | FileCheck --check-prefix=LIMIT %s
6 ; Function Attrs: nounwind uwtable
7 define i32 @bar(i32 %arg) local_unnamed_addr #0 {
9 %tmp = icmp slt i32 %arg, 0
10 br i1 %tmp, label %bb1, label %bb4
13 %tmp2 = tail call i32 (...) @n() #2
14 %tmp3 = icmp slt i32 %tmp2, %arg
15 br i1 %tmp3, label %bb7, label %bb4
17 bb4: ; preds = %bb1, %bb
18 %tmp5 = tail call i32 (...) @m() #2
19 %tmp6 = icmp slt i32 %tmp5, %arg
20 br i1 %tmp6, label %bb7, label %bb8
22 bb7: ; preds = %bb4, %bb1
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
30 tail call void (...) @foo() #2
31 tail call void (...) @foo() #2
34 bb8: ; preds = %bb7, %bb4
35 %tmp9 = phi i32 [ 0, %bb7 ], [ 1, %bb4 ]
39 declare i32 @n(...) local_unnamed_addr #1
41 declare i32 @m(...) local_unnamed_addr #1
43 declare void @foo(...) local_unnamed_addr #1
45 ; Function Attrs: nounwind uwtable
46 define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 {
48 ; CHECK-LABEL: @dummy_caller
52 ; CHECK: call void @bar.1.
53 ; LIMIT-LABEL: @dummy_caller
55 ; LIMIT: call i32 @bar
56 %tmp = tail call i32 @bar(i32 %arg)
60 attributes #0 = { nounwind }
61 attributes #1 = { nounwind }
62 attributes #2 = { nounwind }