[llvm] r325359 - Fix signed/unsigned comparison warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 08:52:50 PST 2018
Author: rksimon
Date: Fri Feb 16 08:52:50 2018
New Revision: 325359
URL: http://llvm.org/viewvc/llvm-project?rev=325359&view=rev
Log:
Fix signed/unsigned comparison warning. NFCI.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=325359&r1=325358&r2=325359&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Fri Feb 16 08:52:50 2018
@@ -1462,7 +1462,7 @@ bool TargetLowering::SimplifyDemandedVec
bool Updated = false;
bool IdentityLHS = true, IdentityRHS = true;
SmallVector<int, 32> NewMask(ShuffleMask.begin(), ShuffleMask.end());
- for (int i = 0; i != NumElts; ++i) {
+ for (unsigned i = 0; i != NumElts; ++i) {
int &M = NewMask[i];
if (M < 0)
continue;
@@ -1471,8 +1471,8 @@ bool TargetLowering::SimplifyDemandedVec
Updated = true;
M = -1;
}
- IdentityLHS &= (M < 0) || (M == i);
- IdentityRHS &= (M < 0) || ((M - NumElts) == i);
+ IdentityLHS &= (M < 0) || (M == (int)i);
+ IdentityRHS &= (M < 0) || ((M - NumElts) == (int)i);
}
// Update legal shuffle masks based on demanded elements if it won't reduce
More information about the llvm-commits
mailing list