Fix build warning introduced in r270552 "[AMDGPU][llvm-mc] Disassembler: support for TTMP/TBA/TMA registers."

llvm-svn: 270859
This commit is contained in:
Artem Tamazov 2016-05-26 15:52:16 +00:00
parent cf340bd9c1
commit b49c3361e5
1 changed files with 2 additions and 1 deletions

View File

@ -359,7 +359,8 @@ MCOperand AMDGPUDisassembler::decodeSrcOp(const OpWidthTy Width, unsigned Val) c
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) {