brintos

brintos / llvm-project-archived public Read only

0
0
Text · 615 B · d2c12fb Raw
23 lines · plain
1; Test that prof-inject does not modify existing metadata (incl. "unknown")2 3; RUN: opt -passes=prof-inject %s -S -o - | FileCheck %s4 5define void @foo(i32 %i) {6  %c = icmp eq i32 %i, 07  br i1 %c, label %yes, label %no, !prof !08yes:9  br i1 %c, label %yes2, label %no, !prof !110yes2:11  ret void12no:13  ret void14}15 16!0 = !{!"branch_weights", i32 1, i32 2}17!1 = !{!"unknown", !"test"}18; CHECK: define void @foo(i32 %i) !prof !019; CHECK: br i1 %c, label %yes, label %no, !prof !120; CHECK: !0 = !{!"function_entry_count", i64 1000}21; CHECK: !1 = !{!"branch_weights", i32 1, i32 2}22; CHECK: !2 = !{!"unknown", !"test"}23