[PATCH] D136822: [InstCombine] Allow memcpys from constant memory to readonly noalias parameters to be elided.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 03:50:15 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:93
+             (IsArgOperand &&
+              Call->paramHasAttr(DataOpNo, Attribute::ReadOnly) &&
+              Call->paramHasAttr(DataOpNo, Attribute::NoAlias))) &&
----------------
nikic wrote:
> Use onlyReadsMemory(DataOpNo) here, to also handle readnone implicitly.
Noticed a pre-existing issue while reviewing this, fixed in https://reviews.llvm.org/D136834.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136822



More information about the llvm-commits mailing list