24 lines · plain
1; Test that prof-inject does not modify existing metadata (incl. "unknown")2 3; RUN: opt -passes=prof-verify %s -S --disable-output4 5define void @foo(i32 %i) !prof !0 {6 %c = icmp eq i32 %i, 07 br i1 %c, label %yes, label %no, !prof !18yes:9 br i1 %c, label %yes2, label %no, !prof !210yes2:11 ret void12no:13 ret void14}15 16!0 = !{!"function_entry_count", i32 1}17!1 = !{!"branch_weights", i32 1, i32 2}18!2 = !{!"unknown", !"test"}19; CHECK: define void @foo(i32 %i) !prof !020; CHECK: br i1 %c, label %yes, label %no, !prof !121; CHECK: !0 = !{!"function_entry_count", i64 1}22; CHECK: !1 = !{!"branch_weights", i32 1, i32 2}23; CHECK: !2 = !{!"unknown", !"test"}24