[PATCH] D52416: Allow FP types for atomicrmw xchg

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 08:40:42 PST 2018


jyknight added inline comments.


================
Comment at: lib/CodeGen/AtomicExpandPass.cpp:500
+
+  bool NeedBitcast = OrigTy->isFloatingPointTy();
+  if (NeedBitcast) {
----------------
arsenm wrote:
> jyknight wrote:
> > Add a comment here that this code can go away if the cmpxchg instruction adds support for floating point types.
> I think there might need to be a separate fcmpxchg instruction for that, unless you mean there will also be a version that treats the FP type here as integer in memory
No -- the intent is not to compare for floating-point-equality ala fcmp, but rather just as bit equality. (e.g. NaNs are equal to each-other when they have the same bit representation, and unequal if they do not)


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

https://reviews.llvm.org/D52416





More information about the llvm-commits mailing list