[clang] [llvm] [AArch64] Implement the atomic store with hint intrinsic (PR #198316)

Kerry McLaughlin via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 27 05:29:52 PDT 2026


================
@@ -282,6 +282,134 @@ def : Pat<(relaxed_store<atomic_store_64>
                (am_unscaled64 GPR64sp:$Rn, simm9:$offset), (i64 (bitconvert (f64 FPR64Op:$val)))),
           (STURDi FPR64Op:$val, GPR64sp:$Rn, simm9:$offset)>;
 
+//===----------------------------------
+// Atomic store with hint pseudos
+//===----------------------------------
+
+let Size = 8, isCodeGenOnly = 1, hasSideEffects = 1, mayStore = 1 in {
+  class BaseStoreHintPseudo<RegisterClass regtype>
+        : Pseudo<(outs), (ins GPR64sp:$addr, regtype:$data,
+                          i32imm:$order, i32imm:$hint), []>, Sched<[WriteAtomic]>;
----------------
kmclaughlin-arm wrote:

I think the flag needed is `IsAtomicOrderingReleaseOrStronger`, but I've replaced `Order` with `Relaxed` and removed duplicate patterns.

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


More information about the cfe-commits mailing list