[llvm] r340868 - [AMDGPU] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=off

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 28 12:19:03 PDT 2018


Author: maskray
Date: Tue Aug 28 12:19:03 2018
New Revision: 340868

URL: http://llvm.org/viewvc/llvm-project?rev=340868&view=rev
Log:
[AMDGPU] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=off

Modified:
    llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp?rev=340868&r1=340867&r2=340868&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp Tue Aug 28 12:19:03 2018
@@ -355,8 +355,7 @@ static bool tryAddToFoldList(SmallVector
             !TII->getRegisterInfo().isVGPR(MRI, OtherOp.getReg()))
           return false;
 
-        const MachineOperand &SDst = MI->getOperand(1);
-        assert(SDst.isDef());
+        assert(MI->getOperand(1).isDef());
 
         int Op32 =  AMDGPU::getVOPe32(Opc);
         FoldList.push_back(FoldCandidate(MI, CommuteOpNo, OpToFold, true,




More information about the llvm-commits mailing list