[PATCH] D51817: Do not use optimized atomic libcalls for misaligned atomics.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 7 15:25:36 PDT 2018


efriedma added inline comments.


================
Comment at: lib/CodeGen/CGAtomic.cpp:949
     case AtomicExpr::AO__opencl_atomic_compare_exchange_strong:
     case AtomicExpr::AO__atomic_load_n:
     case AtomicExpr::AO__atomic_store_n:
----------------
Is there any particular reason to expect that the pointer operand to __atomic_load_n can't be misaligned?  I mean, for most ABIs, integers are naturally aligned, but that isn't actually a hard rule.


Repository:
  rC Clang

https://reviews.llvm.org/D51817





More information about the cfe-commits mailing list