[llvm] [PGO] Add ProfileInjector and ProfileVerifier passes (PR #147388)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 10:28:33 PDT 2025
================
@@ -0,0 +1,21 @@
+; Test that prof-inject does not modify existing metadata (incl. "unknown")
+
+; RUN: opt -passes=prof-inject %s -S -o - | FileCheck %s
+; RUN: opt -passes=prof-verify %s -S --disable-output
+
+define void @foo(i32 %i) {
+ %c = icmp eq i32 %i, 0
+ br i1 %c, label %yes, label %no, !prof !0
----------------
snehasish wrote:
This test only verifies that no modifications take place for `Instruction::Br`. If you want to have a test like this, we should cover the other terminators too.
https://github.com/llvm/llvm-project/pull/147388
More information about the llvm-commits
mailing list