Skip to content

Commit 0d51c87

Browse files
committed
[X86] Fix -Wsign-compare in X86MCInstLower.cpp (NFC)
llvm-project/llvm/lib/Target/X86/X86MCInstLower.cpp:1867:20: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] if (SclWidth == C->getType()->getScalarSizeInBits()) { ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
1 parent ed12388 commit 0d51c87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86MCInstLower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ static void addConstantComments(const MachineInstr *MI,
18641864

18651865
if (auto *C =
18661866
X86::getConstantFromPool(*MI, MI->getOperand(1 + X86::AddrDisp))) {
1867-
if (SclWidth == C->getType()->getScalarSizeInBits()) {
1867+
if ((unsigned)SclWidth == C->getType()->getScalarSizeInBits()) {
18681868
if (auto *CI = dyn_cast<ConstantInt>(C)) {
18691869
CS << "[";
18701870
printConstant(CI->getValue(), CS);

0 commit comments

Comments
 (0)