[clang] [llvm] [AArch64] Implement the atomic store with hint intrinsic (PR #198316)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 22 09:18:39 PDT 2026
================
@@ -320,6 +321,94 @@ bool SemaARM::BuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall,
return false;
}
+bool SemaARM::BuiltinARMAtomicStoreHintCall(unsigned BuiltinID,
+ CallExpr *TheCall) {
+ if (SemaRef.checkArgCount(TheCall, 4))
+ return true;
+
+ // Arg 0 should be the pointer type. The pointee type must be a
+ // scalar integral or floating-point type of 8, 16, 32 or 64 bits.
+ ASTContext &Context = getASTContext();
+ Expr *PtrArg = TheCall->getArg(0);
+ auto PtrArgRes = SemaRef.DefaultFunctionArrayLvalueConversion(PtrArg);
+ if (PtrArgRes.isInvalid())
+ return true;
+ auto *PtrTy = PtrArg->getType()->getAs<PointerType>();
----------------
Lukacma wrote:
I meant we could use PtrArgRes here since we already have it available. I don't think it's going to affect much, but it seems more accurate to me.
https://github.com/llvm/llvm-project/pull/198316
More information about the cfe-commits
mailing list