1; RUN: opt < %s -partial-inliner -max-num-inline-blocks=2 -skip-partial-inlining-cost-analysis -S | FileCheck %s 2 3; This test checks to make sure that CodeExtractor updates 4; 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 !2 9if.then: 10 br i1 %cond, label %return, label %return.2, !prof !3 11return.2: 12 ret i32 10 13return: ; preds = %entry 14 ret i32 0 15} 16 17 18define internal i32 @dummyCaller(i1 %cond) !prof !1 { 19entry: 20%val = call i32 @inlinedFunc(i1 %cond) 21ret i32 %val 22 23; CHECK-LABEL: @dummyCaller 24; CHECK: call 25; 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 31, i32 8} 35