[llvm] 1a9cc47 - Fixed a -Wunused-variable warning in no-assert builds
Dmitri Gribenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 00:22:06 PDT 2020
Author: Dmitri Gribenko
Date: 2020-04-29T09:12:47+02:00
New Revision: 1a9cc47f94d9e5e387f8d7f0e57c7b20881a2160
URL: https://github.com/llvm/llvm-project/commit/1a9cc47f94d9e5e387f8d7f0e57c7b20881a2160
DIFF: https://github.com/llvm/llvm-project/commit/1a9cc47f94d9e5e387f8d7f0e57c7b20881a2160.diff
LOG: Fixed a -Wunused-variable warning in no-assert builds
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 a043f307bb74..07d5b62cd250 100644
--- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
@@ -1800,8 +1800,7 @@ MachineInstr *SIRegisterInfo::findReachingDef(Register Reg, unsigned SubReg,
}
MCPhysReg SIRegisterInfo::get32BitRegister(MCPhysReg Reg) const {
- const TargetRegisterClass *RC = getPhysRegClass(Reg);
- assert(getRegSizeInBits(*RC) <= 32);
+ assert(getRegSizeInBits(*getPhysRegClass(Reg)) <= 32);
for (const TargetRegisterClass &RC : { AMDGPU::VGPR_32RegClass,
AMDGPU::SReg_32RegClass,
More information about the llvm-commits
mailing list