]> granicus.if.org Git - llvm/commitdiff
[LazyValueInfo] Use Type::getIntegerBitWidth instead of casting to IntegerType to...
authorCraig Topper <craig.topper@gmail.com>
Sat, 3 Jun 2017 07:47:14 +0000 (07:47 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 3 Jun 2017 07:47:14 +0000 (07:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304656 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LazyValueInfo.cpp

index 5180f07eaa28fa13ec0674ad2d447148f033f9ea..6a9ae6440aceca2b42328835820201c349aea34b 100644 (file)
@@ -1213,8 +1213,7 @@ bool LazyValueInfoImpl::solveBlockValueCast(LVILatticeVal &BBLV,
       LHSRange = LHSVal.getConstantRange();
   }
 
-  const unsigned ResultBitWidth =
-    cast<IntegerType>(CI->getType())->getBitWidth();
+  const unsigned ResultBitWidth = CI->getType()->getIntegerBitWidth();
 
   // NOTE: We're currently limited by the set of operations that ConstantRange
   // can evaluate symbolically.  Enhancing that set will allows us to analyze