[clang] [llvm] [AArch64] Implement the atomic fetch with hint intrinsic (PR #227711)

Kerry McLaughlin via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 8 09:46:42 PDT 2026


================
@@ -34102,11 +34102,15 @@ bool AArch64TargetLowering::fallBackToDAGISel(const Instruction &Inst) const {
   }
 
   // The !mem.cache_hint metadata is not supported by GISel and will be dropped.
-  // TODO: Remove this and handle atomic store hints in GISel once supported.
+  // TODO: Remove this and handle atomic hints in GISel once supported.
   if (auto *Store = dyn_cast<StoreInst>(&Inst)) {
     if (Store->isAtomic() && getMemCacheHintMetadata(*Store, 1))
       return true;
   }
+  if (auto *RMW = dyn_cast<AtomicRMWInst>(&Inst)) {
+    if (getMemCacheHintMetadata(*RMW))
+      return true;
+  }
----------------
kmclaughlin-arm wrote:

```suggestion
  if (auto *RMW = dyn_cast<AtomicRMWInst>(&Inst))
    if (getMemCacheHintMetadata(*RMW))
      return true;
```

https://github.com/llvm/llvm-project/pull/227711


More information about the cfe-commits mailing list