================
@@ -282,6 +282,53 @@ 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
+//===----------------------------------
+
+class BaseStoreHintPseudo<RegisterClass regtype>
+ : Pseudo<(outs), (ins GPR64sp:$addr, regtype:$data,
+ i32imm:$order, i32imm:$hint), []>,
Sched<[WriteAtomic]> {
+ let Size = 8;
+ let isCodeGenOnly = 1;
+ let hasSideEffects = 1;
+ let mayStore = 1;
+}
+
+def ATOMIC_STORE_HINT_B : BaseStoreHintPseudo<GPR32>;
+def ATOMIC_STORE_HINT_H : BaseStoreHintPseudo<GPR32>;
+def ATOMIC_STORE_HINT_S : BaseStoreHintPseudo<GPR32>;
+def ATOMIC_STORE_HINT_D : BaseStoreHintPseudo<GPR64>;
+
+class atomic_hint_store<PatFrag Base, bit Rel, bit SeqCst, code Pred, code
GIPred>
+ : PatFrag<(ops node:$ptr, node:$val),
----------------
kmclaughlin-arm wrote:
I followed the pattern of the `releasing_store` & `relaxed_store` classes
defined earlier in this .td file, which also swap the operands.
Since I'm not using those anymore, I've changed the order of the operands to
match `atomic_store_*`.
https://github.com/llvm/llvm-project/pull/198316
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits