__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141332
91177308-0d34-0410-b5e6-
96231b3b80d8
// Non-overloaded atomic builtins.
BUILTIN(__sync_synchronize, "v.", "n")
-// LLVM instruction builtin [Clang extension].
-BUILTIN(__builtin_llvm_memory_barrier,"vbbbbb", "n")
// GCC does not support these, they are a Clang extension.
BUILTIN(__sync_fetch_and_min, "iiD*i", "n")
BUILTIN(__sync_fetch_and_max, "iiD*i", "n")
return RValue::get(0);
}
- case Builtin::BI__builtin_llvm_memory_barrier: {
- Value *C[5] = {
- EmitScalarExpr(E->getArg(0)),
- EmitScalarExpr(E->getArg(1)),
- EmitScalarExpr(E->getArg(2)),
- EmitScalarExpr(E->getArg(3)),
- EmitScalarExpr(E->getArg(4))
- };
- Builder.CreateCall(CGM.getIntrinsic(Intrinsic::memory_barrier), C);
- return RValue::get(0);
- }
-
// Library functions with special handling.
case Builtin::BIsqrt:
case Builtin::BIsqrtf: