[PATCH] D97224: Use Address for CGBuilder's CreateAtomicRMW and CreateAtomicCmpXchg.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 11 22:28:18 PST 2021


rjmccall added a comment.

In D97224#2604537 <https://reviews.llvm.org/D97224#2604537>, @jyknight wrote:

>> I'm less certain about what to do with the `__atomic_*` builtins
>
> The `__atomic` builtins have already been supporting under-aligned pointers all along -- and that behavior is unchanged by this patch.

How so?  Clang hasn't been passing down an alignment, which means that it's been building `atomicrmw` instructions with the natural alignment for the IR type, which means we've been assuming that all pointers have a least that alignment.  The LLVM documentation even says that `atomicrmw` doesn't allow under-alignment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97224



More information about the cfe-commits mailing list