Get rid of a signed/unsigned compare warning.
authorReid Spencer <rspencer@reidspencer.com>
Wed, 12 Apr 2006 19:28:15 +0000 (19:28 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 12 Apr 2006 19:28:15 +0000 (19:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27625 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopStrengthReduce.cpp

index ea416dd43ea8f60b9f824fe649ad530a1eb93bcd..d3ac797651fb06937d19d52806b705969ad909da 100644 (file)
@@ -882,7 +882,7 @@ unsigned LoopStrengthReduce::CheckForIVReuse(const SCEVHandle &Stride,
            I = TLI->legal_am_scale_begin(), E = TLI->legal_am_scale_end();
          I != E; ++I) {
       unsigned Scale = *I;
-      if (abs(SInt) < Scale || (SInt % Scale) != 0)
+      if (unsigned(abs(SInt)) < Scale || (SInt % Scale) != 0)
         continue;
       std::map<SCEVHandle, IVsOfOneStride>::iterator SI =
         IVsByStride.find(SCEVUnknown::getIntegerSCEV(SInt/Scale, Type::UIntTy));