AMDGPU: Fix unused variable warning in release build
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 1 Oct 2015 22:40:35 +0000 (22:40 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 1 Oct 2015 22:40:35 +0000 (22:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249091 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIInsertWaits.cpp

index e0cf84abefc167b4bd6116c7c9ca123564b0734e..eeb79eed640c56afffefac9dad82185a5f66c610 100644 (file)
@@ -158,8 +158,8 @@ Counters SIInsertWaits::getHwCounts(MachineInstr &MI) {
     if (TII->isSMRD(MI.getOpcode())) {
 
       if (MI.getNumOperands() != 0) {
-        MachineOperand &Op = MI.getOperand(0);
-        assert(Op.isReg() && "First LGKM operand must be a register!");
+        assert(MI.getOperand(0).isReg() &&
+               "First LGKM operand must be a register!");
 
         // XXX - What if this is a write into a super register?
         const TargetRegisterClass *RC = TII->getOpRegClass(MI, 0);