[llvm] [profcheck] Require `unknown` metadata have an origin parameter (PR #157594)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 9 13:13:26 PDT 2025
================
@@ -140,12 +142,38 @@ define void @test() !prof !0 {
}
!0 = !{!"unknown", i64 123}
-; ON-FUNCTION2: first operand should be 'function_entry_count' or 'synthetic_function_entry_count'
+; ON-FUNCTION2: 'unknown' !prof should have an additional operand of type string
;--- invalid-unknown-placement.ll
define i32 @test() {
%r = add i32 1, 2, !prof !0
ret i32 %r
}
-!0 = !{!"unknown"}
+!0 = !{!"unknown", !"test"}
; INVALID-UNKNOWN-PLACEMENT: 'unknown' !prof should only appear on instructions on which 'branch_weights' would
----------------
david-xl wrote:
does it break IR compatibility?
https://github.com/llvm/llvm-project/pull/157594
More information about the llvm-commits
mailing list