1 ; RUN: opt -S -partial-inliner -max-num-inline-blocks=2 -skip-partial-inlining-cost-analysis < %s | FileCheck %s
2 ; RUN: opt -S -passes=partial-inliner -max-num-inline-blocks=2 -skip-partial-inlining-cost-analysis < %s | FileCheck %s
4 define i32 @test(i32 %arg) local_unnamed_addr #0 {
6 %tmp = tail call i32 (...) @bar() #1
7 %tmp1 = icmp slt i32 %arg, 0
8 br i1 %tmp1, label %bb6, label %bb2
11 tail call void (...) @foo() #1
12 tail call void (...) @foo() #1
13 tail call void (...) @foo() #1
14 tail call void (...) @foo() #1
15 tail call void (...) @foo() #1
16 %tmp3 = tail call i32 (...) @bar() #1
17 %tmp4 = icmp eq i32 %tmp3, 10
18 br i1 %tmp4, label %bb6, label %bb5
21 tail call void (...) @foo() #1
22 tail call void (...) @foo() #1
23 tail call void (...) @foo() #1
24 tail call void (...) @foo() #1
27 bb6: ; preds = %bb5, %bb2, %bb
28 %tmp7 = phi i32 [ 1, %bb5 ], [ 0, %bb ], [ 1, %bb2 ]
32 ; Function Attrs: nounwind uwtable
33 declare i32 @bar(...) local_unnamed_addr #0
35 ; Function Attrs: nounwind uwtable
36 declare void @foo(...) local_unnamed_addr #0
38 ; Function Attrs: nounwind uwtable
39 define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 {
40 ; CHECK-LABEL: @dummy_caller
42 ; CHECK: call void @test.1.bb2()
46 %tmp = tail call i32 @test(i32 %arg)
50 ; CHECK-LABEL: define internal void @test.1.bb2()
52 ; CHECK-NOT: store i32 %tmp7, i32* %tmp7.out
55 attributes #0 = { nounwind uwtable }
56 attributes #1 = { nounwind }
58 !llvm.module.flags = !{!0}
61 !0 = !{i32 1, !"wchar_size", i32 4}
62 !1 = !{!"clang version 5.0.0 (trunk 303574)"}