[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

Mandeep Singh Grang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 3 10:59:33 PDT 2018


mgrang added inline comments.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:3003
+  case Builtin::BI_InterlockedCompareExchangePointer:
+  case Builtin::BI_InterlockedCompareExchangePointer_nf: {
     llvm::Type *RTy;
----------------
rnk wrote:
> Is the no fence version really equivalent to this seq_cst version here?
I don't see InterlockedCompareExchangePointer creating a fence but it should. (since it is the fence version). So maybe that needs to be fixed (and possibly other fence functions).

InterlockedCompareExchangePointer_nf should not create a fence so the current implementation seems correct.


Repository:
  rC Clang

https://reviews.llvm.org/D52807





More information about the cfe-commits mailing list