Use 'unsigned' instead of 'int' in a few places dealing with counts of vector elements.
authorCraig Topper <craig.topper@gmail.com>
Thu, 3 May 2012 07:26:59 +0000 (07:26 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 3 May 2012 07:26:59 +0000 (07:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156060 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index cacdb522bffc6adcb9212b6d4f392a9afb1ad454..60904d097958370cbadf73ec5eed35ee9c2c4f65 100644 (file)
@@ -3176,8 +3176,8 @@ static bool isUndefOrEqual(int Val, int CmpVal) {
 /// from position Pos and ending in Pos+Size, falls within the specified
 /// sequential range (L, L+Pos]. or is undef.
 static bool isSequentialOrUndefInRange(ArrayRef<int> Mask,
-                                       int Pos, int Size, int Low) {
-  for (int i = Pos, e = Pos+Size; i != e; ++i, ++Low)
+                                       unsigned Pos, unsigned Size, int Low) {
+  for (unsigned i = Pos, e = Pos+Size; i != e; ++i, ++Low)
     if (!isUndefOrEqual(Mask[i], Low))
       return false;
   return true;
@@ -10670,7 +10670,7 @@ SDValue X86TargetLowering::LowerSIGN_EXTEND_INREG(SDValue Op,
         EVT NewVT = MVT::getVectorVT(EltVT, NumElems/2);
 
         EVT ExtraEltVT = ExtraVT.getVectorElementType();
-        int ExtraNumElems = ExtraVT.getVectorNumElements();
+        unsigned ExtraNumElems = ExtraVT.getVectorNumElements();
         ExtraVT = EVT::getVectorVT(*DAG.getContext(), ExtraEltVT,
                                    ExtraNumElems/2);
         SDValue Extra = DAG.getValueType(ExtraVT);