1 ; RUN: opt -S -passes=partial-inliner -max-num-inline-blocks=2 -skip-partial-inlining-cost-analysis < %s | FileCheck %s
2 define i32 @test(i32 %arg) local_unnamed_addr #0 {
4 %tmp = tail call i32 (...) @bar() #1
5 %tmp1 = icmp slt i32 %arg, 0
6 br i1 %tmp1, label %bb6, label %bb2
9 tail call void (...) @foo() #1
10 tail call void (...) @foo() #1
11 tail call void (...) @foo() #1
12 tail call void (...) @foo() #1
13 tail call void (...) @foo() #1
14 %tmp3 = tail call i32 (...) @bar() #1
15 %tmp4 = icmp eq i32 %tmp3, 10
16 br i1 %tmp4, label %bb6, label %bb5
19 tail call void (...) @foo() #1
20 tail call void (...) @foo() #1
21 tail call void (...) @foo() #1
22 tail call void (...) @foo() #1
25 bb6: ; preds = %bb5, %bb2, %bb
26 %tmp7 = phi i32 [ %tmp, %bb5 ], [ 0, %bb ], [ %tmp, %bb2 ]
30 declare i32 @bar(...) local_unnamed_addr #1
32 declare void @foo(...) local_unnamed_addr #1
34 ; Function Attrs: nounwind uwtable
35 define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 {
36 ; CHECK-LABEL: @dummy_caller
38 ; CHECK: call void @test.1.bb2()
43 %tmp = tail call i32 @test(i32 %arg)
47 ; CHECK-LABEL: define internal void @test.1.bb2()
49 ; CHECK-NOT: store i32 %tmp7, ptr %tmp7.out
53 attributes #0 = { nounwind uwtable }
54 attributes #1 = { nounwind uwtable }
56 !llvm.module.flags = !{!0}
59 !0 = !{i32 1, !"wchar_size", i32 4}
60 !1 = !{!"clang version 5.0.0 (trunk 303574)"}