[PATCH] D109852: [IR] Return AAMDNodes from Instruction::getMetadata() (NFC)

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 17 00:17:52 PDT 2021


jeroen.dobbelaere added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:3489
   StoreInst *SI = cast<StoreInst>(QB.CreateStore(QPHI, Address));
-  AAMDNodes AAMD;
-  PStore->getAAMetadata(AAMD, /*Merge=*/false);
-  PStore->getAAMetadata(AAMD, /*Merge=*/true);
-  SI->setAAMetadata(AAMD);
+  SI->setAAMetadata(PStore->getAAMetadata().merge(QStore->getAAMetadata()));
   // Choose the minimum alignment. If we could prove both stores execute, we
----------------
Btw, nice bug fix ;)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109852



More information about the llvm-commits mailing list