[llvm] [RFC] Memory Model Relaxation Annotations (PR #78569)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 10:13:20 PDT 2024


================
@@ -793,13 +794,21 @@ Instruction *llvm::propagateMetadata(Instruction *Inst, ArrayRef<Value *> VL) {
   for (auto Kind : {LLVMContext::MD_tbaa, LLVMContext::MD_alias_scope,
                     LLVMContext::MD_noalias, LLVMContext::MD_fpmath,
                     LLVMContext::MD_nontemporal, LLVMContext::MD_invariant_load,
-                    LLVMContext::MD_access_group}) {
+                    LLVMContext::MD_access_group, LLVMContext::MD_mmra}) {
     MDNode *MD = I0->getMetadata(Kind);
+    if (Kind == LLVMContext::MD_mmra && !MD)
+      continue;
----------------
nikic wrote:

Is this separate check necessary? The loop is already guarded by `MD &&`.

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


More information about the llvm-commits mailing list