[llvm] [Local] Make combineAAMetadata() more principled (PR #122091)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 07:36:23 PST 2025


================
@@ -3323,16 +3321,13 @@ void llvm::combineMetadata(Instruction *K, const Instruction *J,
 
     switch (Kind) {
       default:
-        // FIXME: https://github.com/llvm/llvm-project/issues/121495
-        // Change to removing only explicitly listed other metadata, and assert
-        // on unknown metadata, to avoid inadvertently dropping newly added
-        // metadata types.
         K->setMetadata(Kind, nullptr); // Remove unknown metadata
----------------
teresajohnson wrote:

How about doing this at least for the fixed MD types specified in llvm/include/llvm/IR/FixedMetadataKinds.def? If someone adds an MD type there, they should be flagged to update this handling.

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


More information about the llvm-commits mailing list