[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

Peilin Ye via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 18 14:43:28 PDT 2024


================
@@ -621,6 +642,16 @@ let Predicates = [BPFHasLdsx] in {
 
 def LDD : LOADi64<BPF_DW, BPF_MEM, "u64", load>;
 
+class acquiring_load<PatFrags base>
+    : PatFrag<(ops node:$ptr), (base node:$ptr)> {
+  let IsAtomic = 1;
----------------
peilin-ye wrote:

Got it, I'll make it generate acquire and release for weaker types, and look into how to make the error message more useful for stronger types.

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


More information about the cfe-commits mailing list