https://github.com/mtrofin updated 
https://github.com/llvm/llvm-project/pull/145584

>From a9742de1b38e1745268e970845d187108ba292bf Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtro...@google.com>
Date: Tue, 24 Jun 2025 13:14:09 -0700
Subject: [PATCH] [IR][PGO] Verify the structure of `VP` metadata.

---
 llvm/lib/IR/Verifier.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index ae95e3e2bff8d..4236d9bb9630b 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -5008,9 +5008,10 @@ void Verifier::visitProfMetadata(Instruction &I, MDNode 
*MD) {
       Check(mdconst::dyn_extract<ConstantInt>(MDO),
             "!prof brunch_weights operand is not a const int");
     }
+  } else if (ProfName == "VP") {
+    
   } else {
-    Check(ProfName == "VP", "expected either branch_weights or VP profile 
name",
-          MD);
+    CheckFailed("expected either branch_weights or VP profile name", MD);
   }
 }
 

_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to