[llvm] [BOLT][RISCV] Fix atomic-add operand order (PR #215493)

Kito Cheng via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 03:15:57 PDT 2026


================
@@ -557,10 +555,11 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
 
   void atomicAdd(MCInst &Inst, MCPhysReg RegAtomic, MCPhysReg RegTo,
                  MCPhysReg RegCnt) const {
+    // AMO operands are ordered as rd, rs2 (value), rs1 (address).
----------------
kito-cheng wrote:

nit: I think this comment can be drop, we don't really add comment about operand order for every MCInstBuilder :)
```suggestion
```

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


More information about the llvm-commits mailing list