[llvm] b777d30 - [AMDGPU] Avoid unused variable warning in Release builds. NFC.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 10:13:00 PDT 2020
Author: Benjamin Kramer
Date: 2020-10-26T18:11:57+01:00
New Revision: b777d3049652746881b74152416e3ffb025a887c
URL: https://github.com/llvm/llvm-project/commit/b777d3049652746881b74152416e3ffb025a887c
DIFF: https://github.com/llvm/llvm-project/commit/b777d3049652746881b74152416e3ffb025a887c.diff
LOG: [AMDGPU] Avoid unused variable warning in Release builds. NFC.
SIRegisterInfo.cpp:480:19: error: unused variable 'SOffset'
Added:
Modified:
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
index e0641970b65f..a4635d631b7d 100644
--- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
@@ -473,7 +473,6 @@ void SIRegisterInfo::resolveFrameIndex(MachineInstr &MI, Register BaseReg,
#ifndef NDEBUG
MachineBasicBlock *MBB = MI.getParent();
MachineFunction *MF = MBB->getParent();
-#endif
assert(FIOp && FIOp->isFI() && "frame index must be address operand");
assert(TII->isMUBUF(MI));
@@ -482,6 +481,7 @@ void SIRegisterInfo::resolveFrameIndex(MachineInstr &MI, Register BaseReg,
SOffset->getReg() ==
MF->getInfo<SIMachineFunctionInfo>()->getStackPtrOffsetReg()) ||
(SOffset->isImm() && SOffset->getImm() == 0));
+#endif
MachineOperand *OffsetOp = TII->getNamedOperand(MI, AMDGPU::OpName::offset);
int64_t NewOffset = OffsetOp->getImm() + Offset;
More information about the llvm-commits
mailing list