[llvm] 83f3908 - [AMDGPU] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 09:25:22 PDT 2025


Author: Kazu Hirata
Date: 2025-09-02T09:25:16-07:00
New Revision: 83f390859e186d22af8aa32135d7993079ed4666

URL: https://github.com/llvm/llvm-project/commit/83f390859e186d22af8aa32135d7993079ed4666
DIFF: https://github.com/llvm/llvm-project/commit/83f390859e186d22af8aa32135d7993079ed4666.diff

LOG: [AMDGPU] Fix a warning

This patch fixes:

  llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp:298:9: error: unused
  variable 'Src0Idx' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp b/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
index 06186ab4e1b2d..627f89c58e7ad 100644
--- a/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
@@ -295,7 +295,7 @@ MachineInstr *GCNDPPCombine::createDPPInst(MachineInstr &OrigMI,
     }
     auto *Src0 = TII->getNamedOperand(MovMI, AMDGPU::OpName::src0);
     assert(Src0);
-    int Src0Idx = NumOperands;
+    [[maybe_unused]] int Src0Idx = NumOperands;
 
     DPPInst.add(*Src0);
     DPPInst->getOperand(NumOperands).setIsKill(false);


        


More information about the llvm-commits mailing list