[llvm] r270859 - Fix build warning introduced in r270552 "[AMDGPU][llvm-mc] Disassembler: support for TTMP/TBA/TMA registers."
Artem Tamazov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 08:52:16 PDT 2016
Author: artem.tamazov
Date: Thu May 26 10:52:16 2016
New Revision: 270859
URL: http://llvm.org/viewvc/llvm-project?rev=270859&view=rev
Log:
Fix build warning introduced in r270552 "[AMDGPU][llvm-mc] Disassembler: support for TTMP/TBA/TMA registers."
Modified:
llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp?rev=270859&r1=270858&r2=270859&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp Thu May 26 10:52:16 2016
@@ -359,7 +359,8 @@ MCOperand AMDGPUDisassembler::decodeSrcO
if (VGPR_MIN <= Val && Val <= VGPR_MAX) {
return createRegOperand(getVgprClassId(Width), Val - VGPR_MIN);
}
- if (SGPR_MIN <= Val && Val <= SGPR_MAX) {
+ if (Val <= SGPR_MAX) {
+ assert(SGPR_MIN == 0); // "SGPR_MIN <= Val" is always true and causes compilation warning.
return createSRegOperand(getSgprClassId(Width), Val - SGPR_MIN);
}
if (TTMP_MIN <= Val && Val <= TTMP_MAX) {
More information about the llvm-commits
mailing list