Skip to content

Commit 8bb1bdf

Browse files
[X86] Fix warnings
This patch fixes: llvm/lib/Target/X86/X86ISelLowering.cpp:30127:23: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] llvm/lib/Target/X86/X86ISelLowering.cpp:30205:35: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] llvm/lib/Target/X86/X86ISelLowering.cpp:30453:23: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
1 parent 9fc54c0 commit 8bb1bdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30124,7 +30124,7 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
3012430124
// be treated identically.
3012530125
SmallVector<SDValue, 32> AmtWideElts;
3012630126
AmtWideElts.reserve(NumElts);
30127-
for (int I = 0; I != NumElts; ++I) {
30127+
for (unsigned I = 0; I != NumElts; ++I) {
3012830128
AmtWideElts.push_back(Amt.getOperand(I));
3012930129
}
3013030130
SmallVector<SDValue, 32> TmpAmtWideElts;
@@ -30200,7 +30200,7 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
3020030200
(WideEltSizeInBits < 32 || IsConstantSplat) && !Subtarget.hasAVX2()) {
3020130201
Profitable = false;
3020230202
}
30203-
int WideNumElts = AmtWideElts.size();
30203+
unsigned WideNumElts = AmtWideElts.size();
3020430204
// We are only dealing with identical pairs.
3020530205
if (Profitable && WideNumElts != NumElts) {
3020630206
MVT WideScalarVT = MVT::getIntegerVT(WideEltSizeInBits);
@@ -30450,7 +30450,7 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
3045030450
}
3045130451

3045230452
SmallVector<SDValue, 16> LoAmt, HiAmt;
30453-
for (int i = 0; i != NumElts; i += 16) {
30453+
for (unsigned i = 0; i != NumElts; i += 16) {
3045430454
for (int j = 0; j != 8; ++j) {
3045530455
LoAmt.push_back(Amt.getOperand(i + j));
3045630456
HiAmt.push_back(Amt.getOperand(i + j + 8));

0 commit comments

Comments
 (0)