35 lines · plain
1; RUN: opt < %s -passes=partial-inliner -max-num-inline-blocks=2 -skip-partial-inlining-cost-analysis -S | FileCheck %s2 3; This test checks to make sure that CodeExtractor updates4; the exit branch probabilities for multiple exit blocks.5 6define i32 @inlinedFunc(i1 %cond) !prof !1 {7entry:8 br i1 %cond, label %if.then, label %return, !prof !29if.then:10 br i1 %cond, label %return, label %return.2, !prof !311return.2:12 ret i32 1013return: ; preds = %entry14 ret i32 015}16 17 18define internal i32 @dummyCaller(i1 %cond) !prof !1 {19entry:20%val = call i32 @inlinedFunc(i1 %cond)21ret i32 %val22 23; CHECK-LABEL: @dummyCaller24; CHECK: call25; CHECK-NEXT: br i1 {{.*}}return.i{{.*}}return.2{{.*}}!prof [[COUNT1:![0-9]+]]26}27 28!llvm.module.flags = !{!0}29!0 = !{i32 1, !"MaxFunctionCount", i32 10000}30!1 = !{!"function_entry_count", i64 10000}31!2 = !{!"branch_weights", i32 5, i32 5}32!3 = !{!"branch_weights", i32 4, i32 1}33 34; CHECK: [[COUNT1]] = !{!"branch_weights", i32 858993459, i32 214748365}35