[PATCH] D73106: [Alignment][NFC] Use Align with CreateMaskedStore

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 00:42:07 PST 2020


gchatelet marked 2 inline comments as done.
gchatelet added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2907
     Value *Addr = I.getArgOperand(1);
-    const MaybeAlign Alignment(
+    const Align Alignment(
         cast<ConstantInt>(I.getArgOperand(2))->getZExtValue());
----------------
courbet wrote:
> I think it's actually OK for this one to be a `MaybeAlign`, e.g. in `ARMTTIImpl::isLegalMaskedLoad`.
As discussed offline [Verifier.cpp](https://github.com/llvm-mirror/llvm/blob/2c4ca6832fa6b306ee6a7010bfb80a3f2596f824/lib/IR/Verifier.cpp#L4613) requires the alignment to be set for both `masked_load` and `masked_store` intrinsics. I've updated the documentation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73106





More information about the llvm-commits mailing list