24 lines · plain
1; RUN: opt %s -print-prof-data -S | FileCheck %s2 3define void @foo(ptr %p) !prof !0 {4 %isnull = icmp eq ptr %p, null5 br i1 %isnull, label %yes, label %no, !prof !16yes:7 %something = select i1 %isnull, i32 1, i32 2, !prof !28 br label %exit9no:10 call void %p(), !prof !311 br label %exit12exit:13 ret void14}15 16!0 = !{!"function_entry_count", i64 42}17!1 = !{!"branch_weights", i64 20, i64 101}18!2 = !{!"branch_weights", i64 5, i64 70}19!3 = !{!"VP", i32 0, i64 4, i64 4445083295448962937, i64 2, i64 -2718743882639408571, i64 2}20 21; CHECK: define void @foo(ptr %p) !0 = !{!"function_entry_count", i64 42} !prof !0 {22; CHECK: br i1 %isnull, label %yes, label %no, !prof !1 ; !1 = !{!"branch_weights", i64 20, i64 101}23; CHECK: %something = select i1 %isnull, i32 1, i32 2, !prof !2 ; !2 = !{!"branch_weights", i64 5, i64 70}24; CHECK: call void %p(), !prof !3 ; !3 = !{!"VP", i32 0, i64 4, i64 4445083295448962937, i64 2, i64 -2718743882639408571, i64 2}