[llvm] AMDGPU coverity fixes (PR #182013)

RafaƂ Rudnicki via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 20 01:08:17 PST 2026


================
@@ -11971,10 +11971,10 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op,
   case Intrinsic::amdgcn_cooperative_atomic_store_8x16B: {
     MemIntrinsicSDNode *MII = cast<MemIntrinsicSDNode>(Op);
     SDValue Chain = Op->getOperand(0);
-    SDValue Ptr = Op->getOperand(2);
-    SDValue Val = Op->getOperand(3);
-    return DAG.getAtomic(ISD::ATOMIC_STORE, DL, MII->getMemoryVT(), Chain, Val,
-                         Ptr, MII->getMemOperand());
+    SDValue Val = Op->getOperand(2);
+    SDValue Ptr = Op->getOperand(3);
+    return DAG.getAtomic(ISD::ATOMIC_STORE, DL, MII->getMemoryVT(), Chain, Ptr,
+                         Val, MII->getMemOperand());
----------------
bratpiorka wrote:

Note that I only changed the operand names here, not their order. This is to match the getAtomic definition:
`getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT, SDValue Chain, SDValue Ptr, SDValue Val, MachineMemOperand *MMO)`
where Ptr comes before Val. Static analysis complains about this, and it could also be confusing for developers.

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


More information about the llvm-commits mailing list