[PATCH] D68268: [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 05:38:53 PDT 2019


gchatelet added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4027
 
-      ST->setAlignment(Alignment);
+      ST->setAlignment(Align(Alignment));
       Value *V = propagateMetadata(ST, E->Scalars);
----------------
courbet wrote:
> I don't think there are any guarantees that `getABITypeAlignment` is non-zero for now.
Actually it is guaranteed to be an `Align`.
You can have a look at the current implementation: https://github.com/llvm/llvm-project/blob/18f805a7ea5f369ef523821693f1176b40bcfc7e/llvm/lib/IR/DataLayout.cpp#L752


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68268





More information about the llvm-commits mailing list