[PATCH] D134323: AtomicExpand: Avoid some operations if the atomic is overaligned

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 07:59:28 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:701
 
-  PMV.AlignedAddrAlignment = Align(MinWordSize);
+  if (AddrAlign < MinWordSize) {
+    IntegerType *IntTy = DL.getIntPtrType(Ctx, PtrTy->getAddressSpace());
----------------
jyknight wrote:
> Shouldn't this folding get handled by the IR folder already? Why do we need to special case it here?
I don't follow. This check switches the path to avoid creating the ptrtoint


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

https://reviews.llvm.org/D134323



More information about the llvm-commits mailing list