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
3 define i32 @test(i32 %arg) local_unnamed_addr #0 {
5 %tmp = tail call i32 (...) @bar() #1
6 %tmp1 = icmp slt i32 %arg, 0
7 br i1 %tmp1, label %bb6, label %bb2
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 tail call void (...) @foo() #1
15 %tmp3 = tail call i32 (...) @bar() #1
16 %tmp4 = icmp eq i32 %tmp3, 10
17 br i1 %tmp4, label %bb6, label %bb5
20 tail call void (...) @foo() #1
21 tail call void (...) @foo() #1
22 tail call void (...) @foo() #1
23 tail call void (...) @foo() #1
26 bb6: ; preds = %bb5, %bb2, %bb
27 %tmp7 = phi i32 [ %tmp, %bb5 ], [ 0, %bb ], [ %tmp, %bb2 ]
31 declare i32 @bar(...) local_unnamed_addr #1
33 declare void @foo(...) local_unnamed_addr #1
35 ; Function Attrs: nounwind uwtable
36 define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 {
37 ; CHECK-LABEL: @dummy_caller
39 ; CHECK: call void @test.1.bb2()
44 %tmp = tail call i32 @test(i32 %arg)
48 ; CHECK-LABEL: define internal void @test.1.bb2()
50 ; CHECK-NOT: store i32 %tmp7, i32* %tmp7.out
54 attributes #0 = { nounwind uwtable }
55 attributes #1 = { nounwind uwtable }
57 !llvm.module.flags = !{!0}
60 !0 = !{i32 1, !"wchar_size", i32 4}
61 !1 = !{!"clang version 5.0.0 (trunk 303574)"}