efriedma added inline comments.
================ Comment at: lib/CodeGen/CGBuiltin.cpp:3003 + case Builtin::BI_InterlockedCompareExchangePointer: + case Builtin::BI_InterlockedCompareExchangePointer_nf: { llvm::Type *RTy; ---------------- mgrang wrote: > 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. "create a fence" is a little confusing because the AArch64 ldaxr/stlxr have builtin fences... but presumably the "nf" version should use ldxr/stxr instead. At the IR level, that corresponds to "monotonic". Repository: rC Clang https://reviews.llvm.org/D52807 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits