[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

Nikita Popov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Aug 9 01:12:54 PDT 2025


================
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef<unsigned> KnownIDs) {
 
   // A DIAssignID attachment is debug metadata, don't drop it.
   KnownSet.insert(LLVMContext::MD_DIAssignID);
+  if (!ProfcheckDisableMetadataFixes)
+    KnownSet.insert(LLVMContext::MD_prof);
----------------
nikic wrote:

I don't think that inserting it here is correct. This should be handled in the caller, like dropUBImplyingAttrsAndMetadata.

https://github.com/llvm/llvm-project/pull/152420


More information about the llvm-branch-commits mailing list