69 lines · plain
1; RUN: opt < %s -passes=partial-inliner -S | FileCheck %s2; RUN: opt < %s -passes=partial-inliner -max-num-inline-blocks=3 -skip-partial-inlining-cost-analysis -S | FileCheck --check-prefix=LIMIT3 %s3; RUN: opt < %s -passes=partial-inliner -max-num-inline-blocks=2 -S | FileCheck --check-prefix=LIMIT2 %s4 5 6; Function Attrs: nounwind uwtable7define i32 @bar(i32 %arg) local_unnamed_addr #0 {8bb:9 %tmp = icmp slt i32 %arg, 010 br i1 %tmp, label %bb4, label %bb111 12bb1: ; preds = %bb13 %tmp2 = tail call i32 (...) @n() #214 %tmp3 = icmp slt i32 %tmp2, %arg15 br i1 %tmp3, label %bb4, label %bb816 17bb4: ; preds = %bb1, %bb18 %tmp5 = tail call i32 (...) @m() #219 %tmp6 = icmp sgt i32 %tmp5, %arg20 br i1 %tmp6, label %bb7, label %bb821 22bb7: ; preds = %bb423 tail call void (...) @foo() #224 tail call void (...) @foo() #225 tail call void (...) @foo() #226 tail call void (...) @foo() #227 tail call void (...) @foo() #228 tail call void (...) @foo() #229 tail call void (...) @foo() #230 tail call void (...) @foo() #231 tail call void (...) @foo() #232 br label %bb833 34bb8: ; preds = %bb7, %bb4, %bb135 %tmp9 = phi i32 [ 0, %bb7 ], [ 1, %bb4 ], [ 1, %bb1 ]36 ret i32 %tmp937}38 39declare i32 @n(...) local_unnamed_addr #140 41declare i32 @m(...) local_unnamed_addr #142 43declare void @foo(...) local_unnamed_addr #144 45; Function Attrs: nounwind uwtable46define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 {47bb:48; CHECK-LABEL: @dummy_caller49; CHECK: br i150; CHECK: br i151; CHECK: br i152; CHECK: call void @bar.1.53; LIMIT3-LABEL: @dummy_caller54; LIMIT3: br i155; LIMIT3: br i156; LIMIT3-NOT: br i157; LIMIT3: call void @bar.1.58; LIMIT2-LABEL: @dummy_caller59; LIMIT2-NOT: br i160; LIMIT2: call i32 @bar(61 %tmp = tail call i32 @bar(i32 %arg)62 ret i32 %tmp63}64 65attributes #0 = { nounwind }66attributes #1 = { nounwind }67attributes #2 = { nounwind }68 69