[PATCH] D77454: [WIP] LoadInst should store Align, not MaybeAlign.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 00:30:18 PDT 2020


courbet added inline comments.


================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:1380
   // Atomics require at least natural alignment.
-  InitLoaded->setAlignment(MaybeAlign(ResultTy->getPrimitiveSizeInBits() / 8));
+  InitLoaded->setAlignment(Align(ResultTy->getPrimitiveSizeInBits() / 8));
   Builder.CreateBr(LoopBB);
----------------
Is it always the case that the required alignment is the size of the type ? Shouldn't we ask the DataLayout ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77454





More information about the llvm-commits mailing list