1cee313d2SEric Christopher; RUN: opt -S -partial-inliner -max-num-inline-blocks=2 -skip-partial-inlining-cost-analysis < %s | FileCheck %s 2cee313d2SEric Christopher; RUN: opt -S -passes=partial-inliner -max-num-inline-blocks=2 -skip-partial-inlining-cost-analysis < %s | FileCheck %s 3cee313d2SEric Christopher 4cee313d2SEric Christopherdefine i32 @test(i32 %arg) local_unnamed_addr #0 { 5cee313d2SEric Christopherbb: 6cee313d2SEric Christopher %tmp = tail call i32 (...) @bar() #1 7cee313d2SEric Christopher %tmp1 = icmp slt i32 %arg, 0 8cee313d2SEric Christopher br i1 %tmp1, label %bb6, label %bb2 9cee313d2SEric Christopher 10cee313d2SEric Christopherbb2: ; preds = %bb 11cee313d2SEric Christopher tail call void (...) @foo() #1 12cee313d2SEric Christopher tail call void (...) @foo() #1 13cee313d2SEric Christopher tail call void (...) @foo() #1 14cee313d2SEric Christopher tail call void (...) @foo() #1 15cee313d2SEric Christopher tail call void (...) @foo() #1 16cee313d2SEric Christopher %tmp3 = tail call i32 (...) @bar() #1 17cee313d2SEric Christopher %tmp4 = icmp eq i32 %tmp3, 10 18cee313d2SEric Christopher br i1 %tmp4, label %bb6, label %bb5 19cee313d2SEric Christopher 20cee313d2SEric Christopherbb5: ; preds = %bb2 21cee313d2SEric Christopher tail call void (...) @foo() #1 22cee313d2SEric Christopher tail call void (...) @foo() #1 23cee313d2SEric Christopher tail call void (...) @foo() #1 24cee313d2SEric Christopher tail call void (...) @foo() #1 25cee313d2SEric Christopher br label %bb6 26cee313d2SEric Christopher 27cee313d2SEric Christopherbb6: ; preds = %bb5, %bb2, %bb 28cee313d2SEric Christopher %tmp7 = phi i32 [ 1, %bb5 ], [ 0, %bb ], [ 1, %bb2 ] 29cee313d2SEric Christopher ret i32 %tmp7 30cee313d2SEric Christopher} 31cee313d2SEric Christopher 32cee313d2SEric Christopher; Function Attrs: nounwind uwtable 33cee313d2SEric Christopherdeclare i32 @bar(...) local_unnamed_addr #0 34cee313d2SEric Christopher 35cee313d2SEric Christopher; Function Attrs: nounwind uwtable 36cee313d2SEric Christopherdeclare void @foo(...) local_unnamed_addr #0 37cee313d2SEric Christopher 38cee313d2SEric Christopher; Function Attrs: nounwind uwtable 39cee313d2SEric Christopherdefine i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 { 40cee313d2SEric Christopher; CHECK-LABEL: @dummy_caller 41cee313d2SEric Christopher; CHECK: codeRepl.i: 42cee313d2SEric Christopher; CHECK: call void @test.1.bb2() 43cee313d2SEric Christopher; CHECK-NOT: load 44*7c5d2becSJonathan Roelofs; CHECK: br 45cee313d2SEric Christopherbb: 46cee313d2SEric Christopher %tmp = tail call i32 @test(i32 %arg) 47cee313d2SEric Christopher ret i32 %tmp 48cee313d2SEric Christopher} 49cee313d2SEric Christopher 50cee313d2SEric Christopher; CHECK-LABEL: define internal void @test.1.bb2() 51cee313d2SEric Christopher; CHECK: .exitStub: 52cee313d2SEric Christopher; CHECK-NOT: store i32 %tmp7, i32* %tmp7.out 53cee313d2SEric Christopher; CHECK: ret 54cee313d2SEric Christopher 55cee313d2SEric Christopherattributes #0 = { nounwind uwtable } 56cee313d2SEric Christopherattributes #1 = { nounwind } 57cee313d2SEric Christopher 58cee313d2SEric Christopher!llvm.module.flags = !{!0} 59cee313d2SEric Christopher!llvm.ident = !{!1} 60cee313d2SEric Christopher 61cee313d2SEric Christopher!0 = !{i32 1, !"wchar_size", i32 4} 62cee313d2SEric Christopher!1 = !{!"clang version 5.0.0 (trunk 303574)"} 63