[clang] [llvm] [AArch64] Implement the atomic fetch with hint intrinsic (PR #227711)
Kerry McLaughlin via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 6 04:01:07 PDT 2026
================
@@ -433,8 +439,14 @@ bool SemaARM::BuiltinARMAtomicStoreHintCall(unsigned BuiltinID,
diag::err_atomic_hint_has_invalid_hint_type)
<< Hint->getType() << Hint->getSourceRange();
- if (llvm::toAArch64MemoryHint(HintAP->getZExtValue()) ==
- llvm::AArch64MemoryHint::NONE) {
+ auto MemoryHint = llvm::toAArch64MemoryHint(HintAP->getZExtValue());
+ if (!IsStore && MemoryHint != llvm::AArch64MemoryHint::SHUH &&
+ MemoryHint != llvm::AArch64MemoryHint::SHUH_PH)
+ return Diag(TheCall->getBeginLoc(),
+ diag::err_atomic_hint_has_invalid_hint_type)
+ << *HintAP << Hint->getSourceRange();
----------------
kmclaughlin-arm wrote:
I'm wondering if we should treat an invalid hint on the fetch builtin the same way as other invalid hints, i.e. just emit a warning that it will be dropped?
https://github.com/llvm/llvm-project/pull/227711
More information about the cfe-commits
mailing list