Minor code simplification.
authorDan Gohman <gohman@apple.com>
Sun, 11 Apr 2010 22:13:11 +0000 (22:13 +0000)
committerDan Gohman <gohman@apple.com>
Sun, 11 Apr 2010 22:13:11 +0000 (22:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100994 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 44aa5082b1c1804a8f502719e1d5ce93376a31bd..f8b2d78bbef8e309327299465225d6d884c12f5b 100644 (file)
@@ -2922,8 +2922,7 @@ ScalarEvolution::getUnsignedRange(const SCEV *S) {
       if (const SCEVConstant *C = dyn_cast<SCEVConstant>(AddRec->getStart()))
         if (!C->isZero())
           ConservativeResult =
-            ConstantRange(C->getValue()->getValue(),
-                          APInt(getTypeSizeInBits(C->getType()), 0));
+            ConstantRange(C->getValue()->getValue(), APInt(BitWidth, 0));
 
     // TODO: non-affine addrec
     if (AddRec->isAffine()) {