[llvm] 70fbcdb - Fix MSVC "signed/unsigned mismatch" warning. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 06:41:20 PST 2024
Author: Simon Pilgrim
Date: 2024-01-26T14:40:10Z
New Revision: 70fbcdb41d50ee23a36501aee733be33eecfb7da
URL: https://github.com/llvm/llvm-project/commit/70fbcdb41d50ee23a36501aee733be33eecfb7da
DIFF: https://github.com/llvm/llvm-project/commit/70fbcdb41d50ee23a36501aee733be33eecfb7da.diff
LOG: Fix MSVC "signed/unsigned mismatch" warning. NFC.
Added:
Modified:
llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
index 93c0f86c4e41be..9dedd399089891 100644
--- a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+++ b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
@@ -150,7 +150,7 @@ static DecodeStatus decodeSrcOp(MCInst &Inst, unsigned EncSize,
unsigned Imm, unsigned EncImm,
bool MandatoryLiteral, unsigned ImmWidth,
const MCDisassembler *Decoder) {
- assert(Imm < (1 << EncSize) && "Operand doesn't fit encoding!");
+ assert(Imm < (1U << EncSize) && "Operand doesn't fit encoding!");
auto DAsm = static_cast<const AMDGPUDisassembler *>(Decoder);
return addOperand(
Inst, DAsm->decodeSrcOp(OpWidth, EncImm, MandatoryLiteral, ImmWidth));
More information about the llvm-commits
mailing list