[PATCH] D93927: [ArgPromotion] Copy !range metadata for loads.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 2 11:52:12 PDT 2021


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:316
           newLoad->setAlignment(OrigLoad->getAlign());
-          // Transfer the AA info too.
-          AAMDNodes AAInfo;
-          OrigLoad->getAAMetadata(AAInfo);
-          newLoad->setAAMetadata(AAInfo);
+          newLoad->copyMetadata(*OrigLoad, {LLVMContext::MD_align});
+          // The more aggressive assumptions made by the other metadatas may
----------------
Why is it okay to copy align metadata unconditionally? I would have expected it to get the same treatment as other metadata.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93927/new/

https://reviews.llvm.org/D93927



More information about the llvm-commits mailing list