[llvm] BPF: Generate locked insn for __sync_fetch_and_add() with cpu v1/v2 (PR #106494)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 04:54:37 PDT 2024
================
@@ -806,6 +806,7 @@ class XADD<BPFWidthModifer SizeOp, string OpcodeStr, PatFrag OpNode>
let Constraints = "$dst = $val" in {
let Predicates = [BPFNoALU32] in {
def XADDW : XADD<BPF_W, "u32", atomic_load_add_i32>;
+ def XADDD : XADD<BPF_DW, "u64", atomic_load_add_i64>;
----------------
eddyz87 wrote:
Right, that thing was not complete and I couldn't figure why, thank you for explaining.
Here is a fixed version: [remove-xadd.txt](https://github.com/user-attachments/files/16816421/remove-xadd.txt)
What I like here is that all xadd variants are grouped together, but up to you.
https://github.com/llvm/llvm-project/pull/106494
More information about the llvm-commits
mailing list