[PATCH] D74083: MemCpyOpt cannot use ABI alignment even if it was not given

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 13:48:56 PST 2020


aqjune marked 3 inline comments as done.
aqjune added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:149
+static Align findStoreAlignment(const DataLayout &DL, const StoreInst *SI) {
+  return DL.getValueOrABITypeAlignment(MaybeAlign(SI->getAlignment()),
+                                       SI->getOperand(0)->getType());
----------------
gchatelet wrote:
> I believe this can now be written as
> ```
> return DL.getValueOrABITypeAlignment(
>     SI->getAlign(),
>     SI->getOperand(0)->getType());
> 
> ```
Fixed via https://github.com/llvm/llvm-project/commit/5687acf431de4f6a156b2f6906eb4eb503ac70ce


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74083





More information about the llvm-commits mailing list