[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 4 08:25:40 PDT 2021


yaxunl added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:5011
+        !ValType->isFloatingType()) {
+      Diag(ExprRange.getBegin(), diag::err_atomic_op_needs_atomic_int_ptr_or_fp)
           << IsC11 << Ptr->getType() << Ptr->getSourceRange();
----------------
rjmccall wrote:
> Does LLVM support atomics on all floating-point types?
LLVM IR parser requires atomicrmw value operand must have size of power of 2, therefore LLVM does not support atomicrmw on x86_fp80 which has size of 80 bytes. LLVM supports atomicrmw on all other floating-point types (bfloat, half, float, double, fp128, ppc_fp128).


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

https://reviews.llvm.org/D71726



More information about the cfe-commits mailing list